Skip to content

Commit 095fd5e

Browse files
committed
add branch name
1 parent d4e938b commit 095fd5e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

.github/workflows/docker.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ on:
99
env:
1010
REGISTRY: ghcr.io
1111
IMAGE_NAME: ${{ github.repository }}
12+
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
1213

1314
jobs:
1415
test:
@@ -60,4 +61,4 @@ jobs:
6061
with:
6162
context: .
6263
push: true
63-
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ (env.BRANCH_NAME == 'main' && 'latest') || env.BRANCH_NAME }}
64+
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.BRANCH_NAME == 'main' && 'latest' || env.BRANCH_NAME }}

0 commit comments

Comments
 (0)