From e08d31e2427de0aa2d889b1734ad087e2f9992c9 Mon Sep 17 00:00:00 2001 From: Arijit Das Date: Tue, 21 Dec 2021 18:33:52 +0530 Subject: [PATCH] Use branch name. --- .github/workflows/publish.yaml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 6be38c3..f017698 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -9,10 +9,12 @@ jobs: steps: - uses: actions/checkout@v2 - name: Get the version + run: echo ::set-output name=tag::$(echo ${GITHUB_REF#refs/tags/}) id: vars - run: | - echo ::set-output name=tag::$(echo ${GITHUB_REF#refs/tags/}) - echo ::set-output name=branch::$(echo ${GITHUB_REF#refs/heads/}) + - name: Extract branch name + shell: bash + run: echo "##[set-output name=branch;]$(echo ${GITHUB_BASE_REF#refs/heads/})" + id: extract_branch - name: Docker Login run: echo ${{ secrets.GITHUB_TOKEN }} | docker login https://docker.pkg.github.com -u vulcanize --password-stdin - name: Build and push @@ -22,4 +24,4 @@ jobs: push: true tags: vulcanize/eth-statediff-service:${{ steps.vars.outputs.tag }} build-args: | - BRANCH=${{ steps.vars.outputs.branch }} + BRANCH=${{ steps.extract_branch.outputs.branch }}