Skip to content

Commit 0a24042

Browse files
committed
Pass image URI as output/input
1 parent 11ce09a commit 0a24042

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

.github/actions/build-push-artifacts/action.yml

+8-1
Original file line numberDiff line numberDiff line change
@@ -47,4 +47,11 @@ runs:
4747
file: ci/Dockerfile
4848
context: .
4949
push: true
50-
tags: ${{ steps.login-ecr-vaec.outputs.registry }}/va_enp_api:${{ inputs.ref }},${{ steps.login-ecr-vaec.outputs.registry }}/va_enp_api:${{ github.sha }} ## Tagging with branch/tag and SHA to maintain SHA record and human readability
50+
tags: ${{ steps.login-ecr-vaec.outputs.registry }}/va_enp_api:${{ inputs.ref }},${{ steps.login-ecr-vaec.outputs.registry }}/va_enp_api:${{ github.sha }} ## Tagging with branch/tag and SHA to maintain SHA record and human readability
51+
52+
# This step sets the Docker image URI as an output from the composite action
53+
- name: Set image output
54+
shell: bash
55+
run: |
56+
# Using the ref tag as our main object to pass around
57+
echo "image=${{ steps.login-ecr-vaec.outputs.registry }}/va_enp_api:${{ inputs.ref }}" >> $GITHUB_OUTPUT

.github/workflows/deploy.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,12 @@ jobs:
4444
with:
4545
task-definition-path: "./cd/va-enp-api-task-definition.json"
4646
container-name: "${{ inputs.environment }}-va-enp-api"
47-
image: nginx:latest ## using this for now because we don't have ENP images yet
47+
image: ${{ steps.build_and_push.outputs.image }}
4848
aws-access-key-id: ${{ secrets.VAEC_AWS_ACCESS_KEY_ID }}
4949
aws-secret-access-key: ${{ secrets.VAEC_AWS_SECRET_ACCESS_KEY }}
5050
aws-region: ${{ secrets.AWS_REGION }}
5151
role-to-assume: ${{ secrets.VAEC_DEPLOY_ROLE }}
52+
environment: ${{ inputs.environment }}
5253
env:
5354
AWS_ARN_REGION: ${{ secrets.AWS_ARN_REGION }}
5455
AWS_ACCOUNT_NUMBER: ${{ secrets.AWS_ACCOUNT_NUMBER }}

0 commit comments

Comments
 (0)