Skip to content

Check SDR URLs (CRON) #588

Check SDR URLs (CRON)

Check SDR URLs (CRON) #588

Workflow file for this run

name: Check SDR URLs (CRON)
on:
schedule:
- cron: "00 09 * * *"
workflow_dispatch:
jobs:
services-de-renseignement:
name: Check url from service de renseignement
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Test SDR urls
run: |
jq ".[].url" ./packages/code-du-travail-frontend/src/data/services-de-renseignement.json | uniq | xargs -n 1 wget --spider
- name: Create the Mattermost Message
if: failure()
run: |
echo "{\"text\":\"Une ou plusieurs URLs des services de renseignement ne sont plus valides : ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}\"}" > mattermost.json
- uses: mattermost/action-mattermost-notify@master
if: failure()
env:
MATTERMOST_WEBHOOK_URL: ${{ secrets.MATTERMOST_WEBHOOK_URL }}