Use branch name.

This commit is contained in:
Arijit Das 2021-12-21 18:33:52 +05:30
parent 0ff60a69da
commit e08d31e242

View File

@ -9,10 +9,12 @@ jobs:
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: Get the version - name: Get the version
run: echo ::set-output name=tag::$(echo ${GITHUB_REF#refs/tags/})
id: vars id: vars
run: | - name: Extract branch name
echo ::set-output name=tag::$(echo ${GITHUB_REF#refs/tags/}) shell: bash
echo ::set-output name=branch::$(echo ${GITHUB_REF#refs/heads/}) run: echo "##[set-output name=branch;]$(echo ${GITHUB_BASE_REF#refs/heads/})"
id: extract_branch
- name: Docker Login - name: Docker Login
run: echo ${{ secrets.GITHUB_TOKEN }} | docker login https://docker.pkg.github.com -u vulcanize --password-stdin run: echo ${{ secrets.GITHUB_TOKEN }} | docker login https://docker.pkg.github.com -u vulcanize --password-stdin
- name: Build and push - name: Build and push
@ -22,4 +24,4 @@ jobs:
push: true push: true
tags: vulcanize/eth-statediff-service:${{ steps.vars.outputs.tag }} tags: vulcanize/eth-statediff-service:${{ steps.vars.outputs.tag }}
build-args: | build-args: |
BRANCH=${{ steps.vars.outputs.branch }} BRANCH=${{ steps.extract_branch.outputs.branch }}