Skip to content

Commit 0d65eda

Browse files
using different tags for rc and prod images
1 parent 097a1f2 commit 0d65eda

File tree

1 file changed

+15
-4
lines changed

1 file changed

+15
-4
lines changed

.github/workflows/ecr_sagemaker_publish.yml

+15-4
Original file line numberDiff line numberDiff line change
@@ -25,18 +25,29 @@ jobs:
2525
name: Publish Sagemaker Image (Release Candidate)
2626
runs-on: ubuntu-latest
2727
env:
28+
VALIDATOR_TAG_NAME: restrict2topic
2829
AWS_REGION: us-east-1
29-
AWS_CI_ROLE__PROD: ${{ secrets.AWS_CI_ROLE__PROD }}
3030
WORKING_DIR: "./"
31-
IS_RC: ${{ github.event.inputs.is_release_candidate || 'true' }}
31+
AWS_CI_ROLE__PROD: ${{ secrets.AWS_CI_ROLE__PROD }}
32+
AWS_ECR_RELEASE_CANDIDATE: ${{ inputs.is_release_candidate || 'true' }}
3233
steps:
3334

3435
- name: Check out head
3536
uses: actions/checkout@v3
3637
with:
3738
persist-credentials: false
3839

39-
- run: echo "Is Release Candidate:$IS_RC"
40+
- run: |
41+
if [ ${{ env.AWS_ECR_RELEASE_CANDIDATE }} == 'true' ]; then
42+
echo "This is a release candidate."
43+
echo "Setting tag to -rc"
44+
ECR_TAG=$VALIDATOR_TAG_NAME-rc
45+
else
46+
echo "This is a production image."
47+
ECR_TAG=$VALIDATOR_TAG_NAME
48+
fi
49+
echo "Setting ECR tag to $ECR_TAG"
50+
echo "ECR_TAG=$ECR_TAG" >> "$GITHUB_OUTPUT"
4051
4152
- name: Set up QEMU
4253
uses: docker/setup-qemu-action@master
@@ -69,4 +80,4 @@ jobs:
6980
cache-from: type=gha
7081
cache-to: type=gha,mode=max
7182
push: true
72-
tags: 064852979926.dkr.ecr.us-east-1.amazonaws.com/gr-sagemaker-validator-images-prod:restrict2topic-rc
83+
tags: 064852979926.dkr.ecr.us-east-1.amazonaws.com/gr-sagemaker-validator-images-prod:${{ env.ECR_TAG }}

0 commit comments

Comments
 (0)