Branch Analysis #2
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: Branch Analysis | |
| on: | |
| schedule: | |
| - cron: '*/5 * * * *' | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| jobs: | |
| update: | |
| runs-on: [self-hosted, dev-plot] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Run branch analysis | |
| run: ./main.sh | |
| - name: Check for changes | |
| id: changes | |
| run: | | |
| if git diff --quiet -- branches.txt; then | |
| echo "has_changes=false" | |
| else | |
| echo "has_changes=true" | |
| fi | |
| - name: Commit and push | |
| if: steps.changes.outputs.has_changes == 'true' | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git add branches.txt README.md | |
| git commit -m "auto: update branch analysis" | |
| git push |