name: Mirror to Disroot on: workflow_dispatch: schedule: - cron: "0 0 1,15 * *" jobs: disroot: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 with: fetch-depth: 0 token: ${{ secrets.PAT_TOKEN }} - name: check for 404 run: | url="https://git.disroot.org/diyhrt/mirrors" status=$(curl -o /dev/null -s -w "%{http_code}" $url) if [ $status -eq 404 ]; then echo "Got 404. Exiting." curl -H "Content-Type: application/json" -d '{"content": "${{ secrets.DISCORD_USER_ID }} $URL returned 404"}' ${{ secrets.WEBHOOK_URL }} exit 1 fi - uses: pixta-dev/repository-mirroring-action@v1.1.1 with: target_repo_url: "git@git.disroot.org:diyhrt/mirrors.git" ssh_private_key: ${{ secrets.SSH_PRIVATE_KEY }}