From d57c260f2938f81a9384eef355d2ac8b45e676ce Mon Sep 17 00:00:00 2001 From: Abdul Rabbani Date: Tue, 17 May 2022 16:28:23 -0400 Subject: [PATCH] Combine build and push --- .github/workflows/on-master.yaml | 50 -------------------------------- .github/workflows/publish.yaml | 17 +++++++++++ 2 files changed, 17 insertions(+), 50 deletions(-) delete mode 100644 .github/workflows/on-master.yaml diff --git a/.github/workflows/on-master.yaml b/.github/workflows/on-master.yaml deleted file mode 100644 index df521cdb03e9..000000000000 --- a/.github/workflows/on-master.yaml +++ /dev/null @@ -1,50 +0,0 @@ -name: Docker Build and publish to Github - -on: - workflow_dispatch: - push: - branches: - - statediff - - statediff-v2 - - statediff-v3 - - v1.10.17-statediff-v3 - - v1.10.16-statediff-v3 - - v1.10.15-statediff-v3 - - v1.10.15-statediff-v2 - - v1.10.14-statediff - - v1.10.13-statediff - - v1.10.12-statediff - - v1.10.11-statediff-v3 - - v1.10.11-statediff - - v1.10.10-statediff - - v1.10.9-statediff - - v1.10.8-statediff - - v1.10.7-statediff - - v1.10.6-statediff - - v1.10.5-statediff - - v1.10.4-statediff - - v1.10.3-statediff - - v1.10.2-statediff - - v1.10.1-statediff - - v1.9.25-statediff - - v1.9.24-statediff - - v1.9.23-statediff - - v1.9.11-statediff - -jobs: - build: - name: Run docker build and publish - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Run docker build - run: docker build -t vulcanize/go-ethereum -f Dockerfile . - - name: Get the version - id: vars - run: echo ::set-output name=sha::$(echo ${GITHUB_SHA:0:7}) - - name: Tag docker image - run: docker tag vulcanize/go-ethereum docker.pkg.github.com/vulcanize/go-ethereum/go-ethereum:${{steps.vars.outputs.sha}} - - name: Docker Login - run: echo ${{ secrets.GITHUB_TOKEN }} | docker login https://docker.pkg.github.com -u vulcanize --password-stdin - - name: Docker Push - run: docker push docker.pkg.github.com/vulcanize/go-ethereum/go-ethereum:${{steps.vars.outputs.sha}} diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 475725e647af..5b8453e8fc92 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -3,9 +3,26 @@ on: release: types: [published] jobs: + build: + name: Run docker build and publish + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Run docker build + run: docker build -t vulcanize/go-ethereum -f Dockerfile . + - name: Get the version + id: vars + run: echo ::set-output name=sha::$(echo ${GITHUB_SHA:0:7}) + - name: Tag docker image + run: docker tag vulcanize/go-ethereum docker.pkg.github.com/vulcanize/go-ethereum/go-ethereum:${{steps.vars.outputs.sha}} + - name: Docker Login + run: echo ${{ secrets.GITHUB_TOKEN }} | docker login https://docker.pkg.github.com -u vulcanize --password-stdin + - name: Docker Push + run: docker push docker.pkg.github.com/vulcanize/go-ethereum/go-ethereum:${{steps.vars.outputs.sha}} push_to_registries: name: Publish assets to Release runs-on: ubuntu-latest + needs: build steps: - name: Get the version id: vars