Daily Harvest #15
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: Daily Harvest | |
| on: | |
| schedule: | |
| # Runs at 02:00 UTC every day | |
| - cron: "0 2 * * *" | |
| workflow_dispatch: # Allows manual triggering | |
| jobs: | |
| run-rake-task: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Set up Ruby | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: "4.0" | |
| - name: Run harvester | |
| run: gem install nokogiri && ruby harvester.rb | |
| - 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 metadata-hdx/ metadata-aardvark/ state.json | |
| git diff --staged --quiet || git commit -m "Auto-update from daily harvest" | |
| git push |