Refresh repos.json + sitemap index + status board #66
This file contains hidden or 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: Refresh repos.json + sitemap index + status board | |
| # Scheduled refreshes from the authenticated GitHub API: | |
| # - repos.json — the static "Also on GitHub" grid (no client-side rate limits) | |
| # - pages-projects.json / sitemap-index.xml — root-domain sitemap aggregation | |
| # (every project Pages site that serves a sitemap, probed live) | |
| # - STATUS.md — central repository status board (live CI/commit/issue badges) | |
| on: | |
| schedule: | |
| - cron: "17 6 * * *" # daily, 06:17 UTC | |
| workflow_dispatch: {} | |
| push: | |
| branches: [main] | |
| paths: | |
| - "scripts/build-repos.sh" | |
| - "scripts/repos-filter.jq" | |
| - "scripts/build-pages-projects.sh" | |
| - "scripts/build-sitemap-index.mjs" | |
| - "scripts/build-status.mjs" | |
| - ".github/workflows/refresh-repos.yml" | |
| permissions: | |
| contents: write | |
| concurrency: | |
| group: refresh-repos | |
| cancel-in-progress: true | |
| jobs: | |
| refresh: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Regenerate repos.json | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: bash scripts/build-repos.sh | |
| - name: Regenerate pages-projects.json + sitemap-index.xml | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| bash scripts/build-pages-projects.sh | |
| node scripts/build-sitemap-index.mjs | |
| - name: Regenerate STATUS.md | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: node scripts/build-status.mjs | |
| - name: Commit if changed | |
| run: | | |
| if git diff --quiet -- repos.json pages-projects.json sitemap-index.xml STATUS.md; then | |
| echo "No changes." | |
| exit 0 | |
| fi | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git add repos.json pages-projects.json sitemap-index.xml STATUS.md | |
| git commit -m "chore: refresh repos.json + sitemap index + status board" | |
| git push |