Skip to content

Commit

Permalink
extract branch name
Browse files Browse the repository at this point in the history
  • Loading branch information
darioalessandro committed Jul 26, 2024
1 parent a1dd0b4 commit b452ba3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/workflows/upload-api-docker-hub.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,14 @@ jobs:
id: extract_sha
run: echo "::set-output name=sha8::$(echo ${GITHUB_SHA::8})"

- name: Extract branch name
id: extract_branch
run: echo "::set-output name=branch::${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}"

- name: Build and push API Docker image
uses: docker/build-push-action@v4
with:
context: .
file: Dockerfile.actix
push: true
tags: securityunion/rustlemania-api:${{ github.ref_name }}-${{ steps.extract_sha.outputs.sha8 }}
tags: securityunion/rustlemania-api:${{ steps.extract_branch.outputs.branch }}-${{ steps.extract_sha.outputs.sha8 }}

0 comments on commit b452ba3

Please sign in to comment.