Update Homebrew New Formulae/Casks #60
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: Update Homebrew New Formulae/Casks | |
| on: | |
| schedule: | |
| - cron: "0 0 * * *" # Everyday 00:00 UTC | |
| workflow_dispatch: | |
| permissions: | |
| contents: write # grant push permission to GITHUB_TOKEN | |
| jobs: | |
| update: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.12" | |
| - name: Install dependencies | |
| run: pip install requests | |
| - name: Run script | |
| env: | |
| GITHUB_TOKEN: ${{ github.token }} | |
| run: python scripts/fetch_homebrew_updates.py | |
| - name: Commit and push | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
| git add data/all_items.json || true | |
| git add data/state.json || true | |
| git add logs/*.md || true | |
| git commit -m "Update Homebrew new formulae $(date -u +"%Y-%m-%d")" || echo "No changes" | |
| git push |