generated from NHSDigital/repository-template
-
Notifications
You must be signed in to change notification settings - Fork 1
37 lines (32 loc) · 1.07 KB
/
cicd-6-snapshot-update.yaml
File metadata and controls
37 lines (32 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: "CI/CD snapshot update (PreProd)"
on:
workflow_dispatch:
inputs:
tag:
description: "Tag of snapshots to set as reference"
required: true
type: string
env:
AWS_REGION: eu-west-2
AWS_S3_ARTEFACTS_BUCKET: vita-${{ secrets.AWS_ACCOUNT_ID }}-artefacts-preprod
jobs:
upload-snapshots:
name: "Update Snapshots in S3"
runs-on: ubuntu-latest
environment: preprod
timeout-minutes: 10
permissions:
id-token: write
contents: read
env:
IAM_ROLE: ${{ secrets.IAM_ROLE }}
steps:
- name: "Configure AWS credentials for S3 upload"
uses: aws-actions/configure-aws-credentials@v4
with:
role-session-name: GitHubActionsSessionUpload
role-to-assume: ${{ env.IAM_ROLE }}
aws-region: ${{ env.AWS_REGION }}
- name: "Set reference to ${{ inputs.tag }} tagged snapshots"
run: |
aws s3 sync --delete s3://${{ env.AWS_S3_ARTEFACTS_BUCKET }}/playwright/${{ inputs.tag }}/ s3://${{ env.AWS_S3_ARTEFACTS_BUCKET }}/playwright/reference/__snapshots__/