Skip to content

Commit

Permalink
add: actions to check repos existence
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelemusiani committed Oct 31, 2024
1 parent 6f7fb00 commit 5dece29
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/check_repos.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Check repo existance

on:
push:


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 $r NOT FOUND;
OK=false
fi
done
if ! $OK; then
echo "Some repos do not exist"
exit 1
fi
'

0 comments on commit 5dece29

Please sign in to comment.