Check for workflows #1562
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
--- | |
name: Check for workflows | |
on: | |
push: | |
pull_request: | |
schedule: | |
- cron: "0 0 * * *" | |
workflow_dispatch: | |
jobs: | |
check: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- name: Install jq | |
run: | | |
sudo apt update | |
sudo apt install -y jq | |
- name: Generate | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
./fetch.sh -u "${{ github.repository_owner }}" -o repos.md | |
./generate.sh -o dashboard.md -i repos.md | |
if [ -z "$(git status -s -- dashboard.md repos.md)" ]; then | |
echo No changes to commit | |
exit 0 | |
fi | |
git config user.email "check-action@github" | |
git config user.name "check-action" | |
git add repos.md dashboard.md | |
git commit -m "Update markdown files" | |
git push origin "${GITHUB_REF#refs/heads/}" |