Skip to content

Commit

Permalink
ci: correctly handle the tag name
Browse files Browse the repository at this point in the history
  • Loading branch information
TimPietrusky committed Jul 24, 2024
1 parent c7caa96 commit ba8c4c9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/workflows/dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,13 @@ jobs:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Set branch name as tag
id: get_tag
run: echo "::set-output name=tag::${GITHUB_REF##*/}" | sed 's/\//-/g'

- name: Build and push
uses: docker/build-push-action@v5
with:
push: true
tags: |
${{ secrets.DOCKERHUB_REPO }}/${{ secrets.DOCKERHUB_IMG }}:${{ github.ref_name | replace('/', '-') }}
${{ secrets.DOCKERHUB_REPO }}/${{ secrets.DOCKERHUB_IMG }}:${{ steps.get_tag.outputs.tag }}

0 comments on commit ba8c4c9

Please sign in to comment.