Product & Community Registries Check #481
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
on: | |
schedule: | |
- cron: "0 3 * * *" | |
name: Product & Community Registries Check | |
defaults: | |
run: | |
shell: bash | |
permissions: | |
contents: write | |
jobs: | |
check-registry: | |
name: Check registry entries | |
runs-on: "ubuntu-latest" | |
outputs: | |
matrix: ${{ steps.get-stacks.outputs.matrix }} | |
steps: | |
- name: Checkout code | |
id: checkout-code | |
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 | |
with: | |
fetch-depth: 0 | |
- name: Setup go | |
id: setup-go | |
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0 | |
with: | |
go-version-file: 'go.mod' | |
- name: Run registries check | |
id: build | |
run: | | |
make build | |
make check_registry | |
- name: Send slack notification | |
if: ${{ failure() && github.event_name == 'schedule' }} | |
uses: slackapi/slack-github-action@e28cf165c92ffef168d23c5c9000cffc8a25e117 # v1.24.0 | |
with: | |
channel-id: ${{ secrets.SLACK_CHANNEL_ID }} | |
payload: | | |
{ | |
"text": "GitHub Action failed", | |
"blocks": [ | |
{ | |
"type": "section", | |
"text": { | |
"type": "mrkdwn", | |
"text": "*Status:* :red_circle: failure\n*Severity:* medium\n*Title:* Alizer's product & community registries nightly run\n*Description:* run failed for `${{ github.ref }}` - `${{ github.sha }}`" | |
} | |
}, | |
{ | |
"type": "actions", | |
"elements": [ | |
{ | |
"type": "button", | |
"text": { | |
"type": "plain_text", | |
"text": ":github: Failed action" | |
}, | |
"url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" | |
} | |
] | |
} | |
] | |
} | |
env: | |
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} | |
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK |