Skip to content

CI/CD snapshot update (PreProd) #13

CI/CD snapshot update (PreProd)

CI/CD snapshot update (PreProd) #13

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@v5
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__/