BAU: Bump the dev-dependencies group across 1 directory with 2 update… #215
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: SAM app test and build and deploy | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
timeout-minutes: 60 | |
permissions: | |
id-token: write | |
contents: read | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # pin@v3 | |
with: | |
fetch-depth: 0 | |
- name: Install Node.js | |
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # pin@v3 | |
with: | |
node-version-file: ".nvmrc" | |
- name: Install ESbuild | |
run: npm install -g esbuild@0.21.5 | |
- name: Test | |
run: npm ci && npm test | |
working-directory: ./ | |
- name: Set up Python 3.9 | |
uses: actions/setup-python@d27e3f3d7c64b4bbf8e4abfb9b63b83e846e0435 # pin@v4 | |
with: | |
python-version: "3.9" | |
- name: Set up SAM cli | |
uses: aws-actions/setup-sam@b42eb7a54dac4039080975e32860b1b30935c9af # pin@v2 | |
- name: sam fix https://github.com/aws/aws-sam-cli/issues/4527 | |
run: $(dirname $(readlink $(which sam)))/pip install --force-reinstall "cryptography==38.0.4" | |
- name: Set up AWS creds | |
uses: aws-actions/configure-aws-credentials@e1e17a757e536f70e52b5a12b2e8d1d1c60e04ef # pin@v1-node16 | |
with: | |
role-to-assume: ${{ secrets.GH_ACTIONS_ROLE_ARN }} | |
aws-region: eu-west-2 | |
- name: SAM validate | |
run: sam validate | |
- name: SAM build | |
run: sam build --manifest package.json | |
- name: Deploy SAM app | |
uses: alphagov/di-devplatform-upload-action@1db904c002e0f98dbcb5ab453ceb1b71de5f7dd3 # pin@v2 | |
with: | |
artifact-bucket-name: ${{ secrets.ARTIFACT_BUCKET_NAME }} | |
signing-profile-name: ${{ secrets.SIGNING_PROFILE_NAME }} |