Skip to content

Commit 485e640

Browse files
committed
Fixes docker image tagging
I think the condition was wrong, but also the check to see if it was master itself is also wrong.
1 parent e21238b commit 485e640

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

.github/workflows/docker.yaml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,9 @@ jobs:
6161
[[ ${BUILDING_TAG} = true ]] && \
6262
VERSION_NAME=${{github.ref_name}}
6363
64+
# Determine if we are building on master
6465
BUILDING_ON_MASTER=false
65-
if (git merge-base --is-ancestor HEAD origin/master); then
66-
BUILDING_ON_MASTER=true
67-
fi
66+
[[ ${GITHUB_REF_NAME} == 'master' ]] && BUILDING_ON_MASTER=true
6867
6968
# Use 'FROM' instruction to use docker build with --label
7069
echo "FROM ${{matrix.target}}" | docker build \
@@ -76,7 +75,7 @@ jobs:
7675
--tag ${IMAGE_NAME}:unstable -
7776
7877
# Also tag with 'latest' if we are building on master
79-
[[ ${BUIDING_TAG} && ${BUILDING_ON_MASTER} = true ]] && \
78+
[[ ${BUILDING_ON_MASTER} = true ]] && \
8079
docker tag ${IMAGE_NAME}:unstable ${IMAGE_NAME}:latest
8180
# Also tag with version if we are building a tag
8281
[[ ${BUILDING_TAG} = true && ${{matrix.target}} != "hydraw" ]] && \

0 commit comments

Comments
 (0)