Skip to content

Commit

Permalink
updated workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
shitwolfymakes committed Mar 22, 2022
1 parent 0afb00b commit 5f5c848
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/publish-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ env:
REGISTRY: ghcr.io
# use DOCKERHUB_USERNAME as the name maybe different from the github username
IMAGE_NAME: ${{ secrets.DOCKERHUB_USERNAME }}/${{ github.event.repository.name }}
TAG: ${{ env.GITHUB_REF_NAME }}

jobs:
build:
Expand All @@ -28,7 +27,11 @@ jobs:

steps:
-
name: Set tag for non-default branches
name: Set tag
run: echo "TAG=${{env.GITHUB_REF_NAME}}" >> $GITHUB_ENV

-
name: Set tag if default branch
if: ${{ env.GITHUB_REF_NAME == main || env.GITHUB_REF_NAME == v2_devel }}
run: echo "TAG=latest" >> $GITHUB_ENV

Expand Down

0 comments on commit 5f5c848

Please sign in to comment.