Merge pull request #763 from govuk-one-login/OJ-3654 #363
This file contains hidden or 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: Package for Build | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: [main] | |
| jobs: | |
| deploy: | |
| name: Package for build | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| env: | |
| AWS_REGION: eu-west-2 | |
| ENVIRONMENT: build | |
| permissions: | |
| id-token: write | |
| contents: read | |
| steps: | |
| - name: Check out repository code | |
| uses: actions/checkout@v4 | |
| - name: Assume temporary AWS role | |
| uses: aws-actions/configure-aws-credentials@v4 | |
| with: | |
| role-to-assume: ${{ secrets.BUILD_GH_ACTIONS_ROLE_ARN }} | |
| aws-region: ${{ env.AWS_REGION }} | |
| - name: SAM Validate | |
| run: sam validate --region ${{ env.AWS_REGION }} -t infrastructure/template.yaml | |
| - name: SAM build | |
| run: | | |
| mkdir out | |
| sam build -t infrastructure/template.yaml -b out/ | |
| - name: Deploy SAM app | |
| uses: govuk-one-login/devplatform-upload-action@v3.10.1 | |
| with: | |
| artifact-bucket-name: ${{ secrets.BUILD_ARTIFACT_SOURCE_BUCKET_NAME }} | |
| signing-profile-name: ${{ secrets.BUILD_SIGNING_PROFILE_NAME }} | |
| working-directory: ./out |