Verify Repo Tags #77
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: "Verify Repo Tags" | |
on: | |
workflow_dispatch: {} | |
schedule: | |
- cron: '00 10 * * 1-5' # Runs at 10:00 UTC, Monday through Friday. | |
jobs: | |
verify-repo-tags: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Setup ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
bundler-cache: true | |
- name: Verify Repo Tags | |
id: verify_repo_tags | |
env: | |
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | |
run: | | |
EXIT_CODE=0 | |
output=$(bundle exec rake verify_repo_tags) || EXIT_CODE=$? | |
echo "$output" | |
exit $EXIT_CODE | |
- name: Notify failure | |
uses: slackapi/slack-github-action@v1 | |
if: ${{ failure() }} | |
with: | |
payload: | | |
{ | |
"channel": "#govuk-platform-support", | |
"username": "Platform Alerts", | |
"text": "The <https://github.com/alphagov/govuk-developer-docs/blob/main/data/repos.yml|Developer Docs repo list> is out of sync with the repos tagged as 'govuk' in GitHub.", | |
"blocks": [ | |
{ | |
"type": "section", | |
"text": { | |
"type": "mrkdwn", | |
"text": "The <https://github.com/alphagov/govuk-developer-docs/blob/main/data/repos.yml|Developer Docs repo list> is out of sync with the repos tagged as 'govuk' in GitHub." | |
}, | |
"accessory": { | |
"type": "button", | |
"text": { | |
"type": "plain_text", | |
"text": "Check the build logs for details" | |
}, | |
"url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}", | |
"action_id": "button-view-workflow" | |
} | |
} | |
] | |
} | |
env: | |
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} | |
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK |