Skip to content

Commit fa37da0

Browse files
VIA-598 Update build job to use action.yaml for deployment to DEV
1 parent 5184e67 commit fa37da0

File tree

1 file changed

+32
-5
lines changed

1 file changed

+32
-5
lines changed

.github/workflows/cicd-1-pull-request.yaml

Lines changed: 32 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ on:
99
pull_request:
1010
types: [opened, reopened]
1111

12+
env:
13+
AWS_REGION: eu-west-2
14+
1215
jobs:
1316
metadata:
1417
name: "Set CI/CD metadata"
@@ -110,11 +113,35 @@ jobs:
110113
name: "Deploy stage"
111114
needs: [metadata, build-stage]
112115
if: github.ref == 'refs/heads/main'
113-
uses: ./.github/workflows/stage-4-deploy.yaml
114-
with:
115-
environment: "dev"
116-
tag_or_sha_to_deploy: "${{ github.sha }}"
117-
secrets: inherit
116+
runs-on: ubuntu-latest
117+
environment: dev
118+
timeout-minutes: 20
119+
concurrency:
120+
group: dev-env
121+
cancel-in-progress: false
122+
permissions:
123+
id-token: write
124+
contents: read
125+
steps:
126+
- name: "Tag or SHA"
127+
id: tag-or-sha
128+
run: |
129+
echo "value=${{ github.sha }}" >> $GITHUB_OUTPUT
130+
- name: "Checkout code"
131+
uses: actions/checkout@v5
132+
with:
133+
ref: ${{ github.sha }}
134+
135+
- name: "Deploy ${{ github.sha }} to AWS (dev)"
136+
timeout-minutes: 10
137+
uses: ./.github/actions/deploy
138+
with:
139+
environment: "dev"
140+
tag_or_sha_to_deploy: ${{ github.sha }}
141+
secret_aws_iam_role: ${{ secrets.IAM_ROLE }}
142+
secret_aws_account_id: ${{ secrets.AWS_ACCOUNT_ID }}
143+
secret_aws_slack_channel_id: ${{ secrets.ALARMS_SLACK_CHANNEL_ID }}
144+
118145
acceptance-stage: # Recommended maximum execution time is 10 minutes
119146
name: "Acceptance stage"
120147
needs: [metadata, deploy-stage]

0 commit comments

Comments
 (0)