Skip to content

Commit 0c04620

Browse files
Clinton WerthClinton Werth
authored andcommitted
confirm vars
1 parent 5a64383 commit 0c04620

File tree

1 file changed

+25
-1
lines changed

1 file changed

+25
-1
lines changed

.github/workflows/aws-role-test.yaml

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ permissions:
1010
contents: read
1111

1212
jobs:
13-
test-aws-role-access:
13+
build-and-push:
1414
runs-on: ubuntu-latest
1515
steps:
1616
- name: Checkout Repo
@@ -23,6 +23,30 @@ jobs:
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

0 commit comments

Comments
 (0)