Status List Mock - Check OAS for Drift #33
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: Status List Mock - Check OAS for Drift | |
| on: | |
| schedule: | |
| # runs at midnight every day | |
| - cron: '0 0 * * *' | |
| workflow_dispatch: | |
| workflow_call: | |
| secrets: | |
| WALLET_CRS_DEPLOY_KEY: | |
| required: true | |
| GH_WORKFLOW_FAILURE_BOT_SLACK_WEBHOOK_URL: | |
| required: true | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| check-oas-for-drift: | |
| name: Check Status List OAS for Drift | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 15 | |
| permissions: | |
| contents: read | |
| env: | |
| CRS_CHECKOUT_PATH: status-list-mock/crs-backend | |
| CRS_OAS_PATH: backend/openApiSpecs/crs-private-spec.yaml | |
| LOCAL_OAS_PATH: status-list-mock/openApiSpec/crs/crs-private-spec.yaml | |
| steps: | |
| - name: Check out OP Mocks repo | |
| uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 | |
| - name: Checkout CRS repo | |
| uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 | |
| with: | |
| repository: govuk-one-login/crs-backend | |
| path: ${{ env.CRS_CHECKOUT_PATH }} | |
| ref: 'main' | |
| ssh-key: ${{ secrets.WALLET_CRS_DEPLOY_KEY }} | |
| - name: Check OAS for drift | |
| uses: oasdiff/oasdiff-action/diff@5fbe96ede8d0c53aeadef122d7a0abb79152d493 # v0.1.1 | |
| with: | |
| base: ${{ env.CRS_CHECKOUT_PATH }}/${{ env.CRS_OAS_PATH }} | |
| revision: ${{ env.LOCAL_OAS_PATH }} | |
| fail-on-diff: true | |
| notify-slack-on-failure: | |
| name: Notify Slack on Failure | |
| needs: [ check-oas-for-drift ] | |
| if: failure() | |
| uses: ./.github/workflows/notify-slack-on-failure.yml | |
| secrets: | |
| GH_WORKFLOW_FAILURE_BOT_SLACK_WEBHOOK_URL: ${{ secrets.GH_WORKFLOW_FAILURE_BOT_SLACK_WEBHOOK_URL }} |