Skip to content

Commit

Permalink
chore: add tag name to image built (#376)
Browse files Browse the repository at this point in the history
  • Loading branch information
wsxiaoys authored Aug 30, 2023
1 parent f847cb2 commit f3c20bd
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ jobs:
run: |
echo "IMAGE_NAME=${GITHUB_REPOSITORY,,}" >>${GITHUB_ENV}
- name: Generate tag name
run: |
echo "TAG_NAME=$(echo $GITHUB_REF | sed 's/main/latest/g')" >>${GITHUB_ENV}
- uses: int128/docker-build-cache-config-action@v1
id: cache
with:
Expand All @@ -65,8 +69,8 @@ jobs:
push: true
context: .
tags: |
ghcr.io/${{ env.IMAGE_NAME }}:latest
${{ env.IMAGE_NAME }}:latest
ghcr.io/${{ env.IMAGE_NAME }}:${{ env.TAG_NAME }}
${{ env.IMAGE_NAME }}:${{ env.TAG_NAME }}
cache-from: ${{ steps.cache.outputs.cache-from }}
cache-to: ${{ steps.cache.outputs.cache-to }}

Expand Down

0 comments on commit f3c20bd

Please sign in to comment.