CI/CD snapshot update (PreProd) #15
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: "CI/CD snapshot update (PreProd)" | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| tag: | |
| description: "Tag and date 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__/ |