Skip to content

Commit

Permalink
use GITHUB_REF get tag name
Browse files Browse the repository at this point in the history
  • Loading branch information
usc committed Jun 17, 2022
1 parent 6a07e14 commit 07d30e2
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions .github/workflows/builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,7 @@ jobs:
${{ runner.os }}-buildx
- name: Get tag
id: tag
uses: dawidd6/action-get-tag@v1
with:
strip_v: true
run: echo "TAG=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV

- name: Build and push
uses: docker/build-push-action@v3
Expand All @@ -53,7 +50,7 @@ jobs:
tags: |
ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}:latest
${{ secrets.DOCKERHUB_USERNAME }}/${{ github.event.repository.name }}:latest
${{ secrets.DOCKERHUB_USERNAME }}/${{ github.event.repository.name }}:${{steps.tag.outputs.tag}}
${{ secrets.DOCKERHUB_USERNAME }}/${{ github.event.repository.name }}:${{ env.TAG }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max

Expand Down

0 comments on commit 07d30e2

Please sign in to comment.