Discover Additional CNCF Org Repos #14
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: Discover Additional CNCF Org Repos | |
| on: | |
| schedule: | |
| # Run weekly on Monday at 04:00 UTC (after the daily project sync) | |
| - cron: '0 4 * * 1' | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| jobs: | |
| discover-repos: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 0 | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Setup Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version: '1.24' | |
| - name: Run discover-repos tool | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| cd util/discover-repos | |
| go mod tidy | |
| go run . "${{ github.workspace }}" | |
| - name: Commit and push changes | |
| run: | | |
| git config --local user.email "github-actions[bot]@users.noreply.github.com" | |
| git config --local user.name "github-actions[bot]" | |
| git add util/data/discovered-repos.yaml | |
| if git diff --cached --quiet; then | |
| echo "No new repositories discovered" | |
| exit 0 | |
| fi | |
| git commit -m "chore: update discovered CNCF org repositories" | |
| git push origin main | |