-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #75 from cartabinaria/check-repos
Check repos
- Loading branch information
Showing
3 changed files
with
65 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
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 | ||
' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters