Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
dwilkie committed Jul 4, 2024
1 parent d6d605d commit 3365d4a
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/public_gateway.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ jobs:
outputs:
matrix: ${{ steps.set-deployment-matrix.outputs.matrix }}
matrixLength: ${{ steps.set-deployment-matrix.outputs.matrixLength }}
deploy: ${{ steps.set-deployment-matrix.outputs.deploy }}

steps:
- name: Set Deployment Matrix
Expand All @@ -31,7 +32,7 @@ jobs:
"image_tag": "staging",
"ecs_service": "public-gateway-staging",
"ecs_cluster": "somleng-switch-staging",
"deploy": "true"
"deploy": true
},
{
Expand All @@ -40,14 +41,15 @@ jobs:
"image_tag": "latest",
"ecs_service": "public-gateway",
"ecs_cluster": "somleng-switch",
"deploy": "true"
"deploy": true
}
]
EOF
)
matrix=$(echo $matrixSource | jq --arg branchName "$branchName" 'map(. | select((.branch==$branchName)) )')
echo "matrix={\"include\":$(echo $matrix)}" >> $GITHUB_OUTPUT
echo "matrixLength=$(echo $matrix | jq length)" >> $GITHUB_OUTPUT
echo "deploy=$(echo $matrix | jq '.[0].deploy')" >> $GITHUB_OUTPUT
build_packages:
name: Build Packages
Expand Down Expand Up @@ -127,7 +129,7 @@ jobs:
- build
- build_packages

if: needs.build.outputs.matrix.deploy == 'true'
if: needs.build.outputs.deploy == 'true'
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
Expand Down

0 comments on commit 3365d4a

Please sign in to comment.