Skip to content

Commit 38100e2

Browse files
committed
fix tagging
1 parent 5d41eae commit 38100e2

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

.github/workflows/stage-3-build-images.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,13 +114,15 @@ jobs:
114114
continue-on-error: false
115115
run: |
116116
PR_NUM_TAG=$(echo "${GITHUB_REF}" | sed 's/refs\/pull\/\([0-9]*\)\/merge/\1/')
117-
117+
SHORT_COMMIT_HASH=$(git rev-parse --short ${GITHUB_SHA})
118118
119119
docker build -f Dockerfile.dotnet.base -t cohort-manager-dotnet-base:latest .
120120
docker tag cohort-manager-dotnet-base:latest "ghcr.io/nhsdigital/cohort-manager-dotnet-base:${PR_NUM_TAG}"
121+
docker tag cohort-manager-dotnet-base:latest "ghcr.io/nhsdigital/cohort-manager-dotnet-base:${SHORT_COMMIT_HASH}"
122+
121123
docker build -f Dockerfile.function.base -t cohort-manager-function-base:latest .
122124
docker tag cohort-manager-function-base:latest "ghcr.io/nhsdigital/cohort-manager-function-base:${PR_NUM_TAG}"
123-
SHORT_COMMIT_HASH=$(git rev-parse --short ${GITHUB_SHA})
125+
docker tag cohort-manager-function-base:latest "ghcr.io/nhsdigital/cohort-manager-function-base:${SHORT_COMMIT_HASH}"
124126
125127
docker push "ghcr.io/nhsdigital/cohort-manager-dotnet-base:${PR_NUM_TAG}"
126128
docker push "ghcr.io/nhsdigital/cohort-manager-dotnet-base:${SHORT_COMMIT_HASH}"

0 commit comments

Comments
 (0)