Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/dev-build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
### This is the Terraform-generated dev-build.yml workflow for the ecr-workflow-test-dev app repository ###
### This is the Terraform-generated dev-build.yml workflow for the ecr-workflow-test app repository ###
### If this is a Lambda repo, uncomment the FUNCTION line at the end of the document ###
### If the container requires any additional pre-build commands, uncomment and edit ###
### the PREBUILD line at the end of the document. ###
Expand Down Expand Up @@ -28,7 +28,7 @@ jobs:
- name: Set CPU Architecture
id: setarch
run: |
echo "### Architecture Selection" >> $GITHUB_STEP_SUMMARY
echo "### :abacus: Architecture Selection" >> $GITHUB_STEP_SUMMARY
if [[ -f .aws-architecture ]]; then
ARCH=$(cat .aws-architecture)
echo "\`$ARCH\` was read from \`.aws-architecture\` and passed to the deploy job." >> $GITHUB_STEP_SUMMARY
Expand Down
31 changes: 30 additions & 1 deletion .github/workflows/prod-promote.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,36 @@ permissions:
contents: read

jobs:
prep:
name: Prep for Promote
runs-on: ubuntu-latest
outputs:
cpuarch: ${{ steps.setarch.outputs.cpuarch }}
steps:
- name: Checkout
uses: actions/checkout@v5

- name: Set CPU Architecture
id: setarch
run: |
echo "### :abacus: Architecture Selection" >> $GITHUB_STEP_SUMMARY
if [[ -f .aws-architecture ]]; then
ARCH=$(cat .aws-architecture)
echo "\`$ARCH\` was read from \`.aws-architecture\` and passed to the deploy job." >> $GITHUB_STEP_SUMMARY
else
ARCH="linux/amd64"
echo "No \`.aws-architecture\` file, so default \`$ARCH\` was passed to the deploy job." >> $GITHUB_STEP_SUMMARY
fi
if [[ "$ARCH" != "linux/arm64" && "$ARCH" != "linux/amd64" ]]; then
echo "$ARCH is INVALID architecture!"
echo "$ARCH is INVALID architecture!" >> $GITHUB_STEP_SUMMARY
exit 1
fi
echo "cpuarch=$ARCH" >> $GITHUB_OUTPUT

deploy:
name: Prod Container Promote
needs: prep
name: Deploy
uses: mitlibraries/.github/.github/workflows/ecr-multi-arch-promote-prod.yml@multi-arch-deploy
secrets: inherit
with:
Expand All @@ -21,5 +49,6 @@ jobs:
GHA_ROLE_PROD: ecr-workflow-test-gha-prod
ECR_STAGE: "ecr-workflow-test-stage"
ECR_PROD: "ecr-workflow-test-prod"
CPU_ARCH: ${{ needs.prep.outputs.cpuarch }}
# FUNCTION: ""

7 changes: 4 additions & 3 deletions .github/workflows/stage-build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
### This is the Terraform-generated dev-build.yml workflow for the ecr-workflow-test-stage app repository ###
### This is the Terraform-generated stage-build.yml workflow for the ecr-workflow-test app repository ###
### If this is a Lambda repo, uncomment the FUNCTION line at the end of the document ###
### If the container requires any additional pre-build commands, uncomment and edit ###
### the PREBUILD line at the end of the document. ###
Expand All @@ -17,6 +17,7 @@ permissions:

jobs:
prep:
name: Prep for Build
runs-on: ubuntu-latest
outputs:
cpuarch: ${{ steps.setarch.outputs.cpuarch }}
Expand All @@ -27,7 +28,7 @@ jobs:
- name: Set CPU Architecture
id: setarch
run: |
echo "### Architecture Selection" >> $GITHUB_STEP_SUMMARY
echo "### :abacus: Architecture Selection" >> $GITHUB_STEP_SUMMARY
if [[ -f .aws-architecture ]]; then
ARCH=$(cat .aws-architecture)
echo "\`$ARCH\` was read from \`.aws-architecture\` and passed to the deploy job." >> $GITHUB_STEP_SUMMARY
Expand All @@ -44,7 +45,7 @@ jobs:

deploy:
needs: prep
name: Stage Container Deploy
name: Stage Deploy
uses: mitlibraries/.github/.github/workflows/ecr-multi-arch-deploy-stage.yml@multi-arch-deploy
secrets: inherit
with:
Expand Down