Skip to content

Deploy preview

Deploy preview #19

Workflow file for this run

name: Deploy preview
on:
workflow_dispatch:
workflow_call:
outputs:
stack-name:
description: The deployed stack name
value: ${{ jobs.deploy.outputs.stack-name }}
aws-region:
description: The region in which the stack was deployed
value: ${{ jobs.deploy.outputs.aws-region }}
permissions:
id-token: write
contents: read
jobs:
build:
name: Build SAM app
runs-on: ubuntu-latest
permissions: {}
outputs:
cache-key: ${{ steps.build.outputs.cache-key }}
cache-restore-keys: ${{ steps.build.outputs.cache-restore-keys }}
steps:
- name: Build SAM application
uses: govuk-one-login/github-actions/sam/build-application@e6b6ed890b35904e1be79f7f35ffec983fa4d9db
id: build
with:
template: infrastructure/template.yaml
cache-name: check-hmrc-api
pull-repository: true
source-dir: lambdas
deploy:
name: Deploy stack
runs-on: ubuntu-latest
timeout-minutes: 15
needs: build
concurrency:
group: deploy-development-${{ github.head_ref || github.ref_name }}
environment:
name: development
url: ${{ steps.deploy.outputs.stack-url }}
outputs:
aws-region: ${{ steps.deploy.outputs.aws-region }}
stack-name: ${{ steps.deploy.outputs.stack-name }}
steps:
- name: Deploy stack
uses: govuk-one-login/github-actions/sam/deploy-stack@e6b6ed890b35904e1be79f7f35ffec983fa4d9db
id: deploy
with:
sam-deployment-bucket: ${{ vars.DEPLOYMENT_ARTIFACTS_BUCKET }}
aws-role-arn: ${{ vars.DEPLOYMENT_ROLE_ARN }}
stack-name-prefix: preview-check-hmrc-api
cache-key: ${{ needs.build.outputs.cache-key }}
cache-restore-keys: ${{ needs.build.outputs.cache-restore-keys }}
s3-prefix: preview
pull-repository: true
delete-failed-stack: true
tags: |
cri:component=ipv-cri-check-hmrc-api
cri:stack-type=preview
cri:application=Orange
cri:deployment-source=github-actions
parameters: |
Environment=dev