Skip to content

Check repo existance #11

Check repo existance

Check repo existance #11

Workflow file for this run

name: Check repo existance
on:
schedule:
- cron: '0 0 * * 1'
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check all teachings
run: |
bash -c '
OK=true
echo "Checking repos..."
for r in $(jq -r '.[].url' < ./teachings.json); do
if [ $(curl -s -o /dev/null -w "%{http_code}" https://github.com/$GITHUB_REPOSITORY_OWNER/$r) -eq 404 ]; then
echo "::error::$r NOT FOUND";
OK=false
fi
done
if ! $OK; then
echo "::error::Some repos do not exist on github but are present on teachings.json"
exit 1
fi
'