File tree Expand file tree Collapse file tree 1 file changed +25
-1
lines changed
Expand file tree Collapse file tree 1 file changed +25
-1
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ permissions:
1010 contents : read
1111
1212jobs :
13- test-aws-role-access :
13+ build-and-push :
1414 runs-on : ubuntu-latest
1515 steps :
1616 - name : Checkout Repo
2323 role-session-name : GithubNGAGeointSession
2424 aws-region : ${{ secrets.AWS_DEV_REGION }}
2525
26+ - name : AWS ECR Login
27+ id : ecr-login
28+ uses : aws-actions/amazon-ecr-login@v2
29+
30+ - name : Set IMAGE_TAG
31+ run : |
32+ if [[ "${{ github.ref_name }}" == "test" ]]; then
33+ echo "IMAGE_TAG=test" >> $GITHUB_ENV
34+ else
35+ echo "IMAGE_TAG=dev" >> $GITHUB_ENV
36+
37+ - name : Build Docker image and push
38+ env :
39+ REGISTRY : ${{ steps.login-ecr.outputs.registry }}
40+ REPOSITORY : " mage/server"
41+ IMAGE_TAG : ${{ env.IMAGE_TAG }}
42+ run :
43+ echo "REGISTRY IS"
44+ echo $REGISTRY
45+ echo "TAG IS"
46+ echo $IMAGE_TAG
47+ echo "using env "
48+ echo $env.IMAGE_TAG
49+
2650 - name : TEST ECR Access
2751 run : aws ecr describe-repositories
2852
You can’t perform that action at this time.
0 commit comments