Merge pull request #777 from govuk-one-login/OJ-3724 #374
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@7474bc4690e29a8392af63c5b98e7449536d5c3a | |
| with: | |
| role-to-assume: ${{ secrets.BUILD_GH_ACTIONS_ROLE_ARN }} | |
| aws-region: ${{ env.AWS_REGION }} | |
| - name: Install SAM CLI | |
| uses: aws-actions/setup-sam@d78e1a4a9656d3b223e59b80676a797f20093133 | |
| with: | |
| version: 1.159.1 | |
| - 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@720ddb75fba8951db5a648ebb416eb233f1b6bc9 | |
| with: | |
| artifact-bucket-name: ${{ secrets.BUILD_ARTIFACT_SOURCE_BUCKET_NAME }} | |
| signing-profile-name: ${{ secrets.BUILD_SIGNING_PROFILE_NAME }} | |
| working-directory: ./out |