Update Feeds #363
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 Feeds | |
| on: | |
| schedule: | |
| - cron: '0 0 * * *' | |
| workflow_dispatch: | |
| jobs: | |
| update: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: '1.21' | |
| - name: Prep | |
| run: mkdir -p output | |
| - name: Build and Run | |
| run: | | |
| go build -o harvest ./src | |
| ./harvest | |
| - name: Commit | |
| run: | | |
| git config --local user.email "action@github.com" | |
| git config --local user.name "GitHub Action" | |
| git add output/blog_posts.json output/feed.xml | |
| git commit -m "action: update blog posts" || echo "no changes to commit" | |
| git push |