Merge pull request #47 from govuk-one-login/OJ-1990-workflow_dispatch #40
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy to Dev | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: # deploy manually | |
jobs: | |
deploy: | |
name: Deploy to dev | |
runs-on: ubuntu-latest | |
timeout-minutes: 15 | |
env: | |
AWS_REGION: eu-west-2 | |
ENVIRONMENT: dev | |
permissions: | |
id-token: write | |
contents: read | |
steps: | |
- name: Check out repository code | |
uses: actions/checkout@v3 | |
- name: Setup SAM | |
uses: aws-actions/setup-sam@v2 | |
with: | |
version: 1.89.0 | |
- name: Assume temporary AWS role | |
uses: aws-actions/configure-aws-credentials@v2 | |
with: | |
role-to-assume: ${{ secrets.DEV_GH_ACTIONS_ROLE_ARN }} | |
aws-region: ${{ env.AWS_REGION }} | |
- name: SAM Validate | |
run: sam validate --region ${{ env.AWS_REGION }} -t infrastructure/template.yaml | |
- name: Deploy SAM app | |
uses: alphagov/[email protected] | |
with: | |
artifact-bucket-name: "${{ secrets.DEV_ARTIFACT_SOURCE_BUCKET_NAME }}" | |
signing-profile-name: "${{ secrets.DEV_SIGNING_PROFILE_NAME }}" | |
template-file: infrastructure/template.yaml |