Prismic Linting #78
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: Prismic Linting | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 4 * * MON-FRI' | |
permissions: | |
id-token: write | |
jobs: | |
prismic_linting: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: aws-actions/configure-aws-credentials@v4 | |
with: | |
aws-region: eu-west-1 | |
role-to-assume: ${{ secrets.EXPERIENCE_GHA_ROLE_ARN }} | |
- uses: aws-actions/amazon-ecr-login@v2 | |
env: | |
AWS_REGION: us-east-1 | |
with: | |
registry-type: public | |
- name: Run Prismic linting | |
run: docker compose run prismic_model yarn lintPrismicData | |
on-failure: | |
runs-on: ubuntu-latest | |
if: ${{ always() && (needs.prismic_linting.result == 'failure' || needs.prismic_linting.result == 'timed_out') }} | |
needs: | |
- prismic_linting | |
steps: | |
- name: Send GitHub Action trigger data to Slack workflow | |
id: slack | |
uses: slackapi/[email protected] | |
with: | |
# This data can be any valid JSON from a previous step in the GitHub Action | |
payload: | | |
{ | |
"action_name": "Prismic linting action", | |
"status": "${{ needs.prismic_linting.result }}", | |
"link": "https://github.com/wellcomecollection/wellcomecollection.org/actions/workflows/prismic-linting.yml" | |
} | |
env: | |
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_GA_ACTION_URL }} |