File tree 1 file changed +15
-4
lines changed
1 file changed +15
-4
lines changed Original file line number Diff line number Diff line change @@ -25,18 +25,29 @@ jobs:
25
25
name : Publish Sagemaker Image (Release Candidate)
26
26
runs-on : ubuntu-latest
27
27
env :
28
+ VALIDATOR_TAG_NAME : restrict2topic
28
29
AWS_REGION : us-east-1
29
- AWS_CI_ROLE__PROD : ${{ secrets.AWS_CI_ROLE__PROD }}
30
30
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' }}
32
33
steps :
33
34
34
35
- name : Check out head
35
36
uses : actions/checkout@v3
36
37
with :
37
38
persist-credentials : false
38
39
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"
40
51
41
52
- name : Set up QEMU
42
53
uses : docker/setup-qemu-action@master
69
80
cache-from : type=gha
70
81
cache-to : type=gha,mode=max
71
82
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 }}
You can’t perform that action at this time.
0 commit comments