name: urls-check
on:
  schedule:
    - cron: '0 4 * * *'
  # can be run manually on https://github.com/cockpit-project/cockpit/actions
  workflow_dispatch:
jobs:
  urls-check:
    runs-on: ubuntu-latest
    permissions:
      issues: write
    steps:
      - name: Set up configuration and secrets
        run: |
          echo '${{ secrets.GITHUB_TOKEN }}' > ~/.config/github-token

      - name: Clone repository
        uses: actions/checkout@v4

      - name: Run urls-check action
        run: |
          tools/urls-check
