Feed Posts Parser #383
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: Feed Posts Parser | |
| on: | |
| workflow_dispatch: # Allows manual triggering | |
| schedule: | |
| - cron: '0 12 * * *' # Runs daily at 12:00 | |
| jobs: | |
| feed-parser: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| issues: write | |
| contents: write | |
| steps: | |
| - name: Checkout output branch | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: output | |
| - name: Run Feed Post Parser | |
| uses: weekdaycare/feed-posts-parser@main | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| data_path: '/v2/posts.json' | |
| posts_count: 3 | |
| date_format: 'YYYY-MM-DD HH:mm' | |
| - name: Setup Git Config | |
| run: | | |
| git config --global user.name 'github-actions[bot]' | |
| git config --global user.email 'github-actions[bot]@users.noreply.github.com' | |
| - name: Commit and Push to output branch | |
| run: | | |
| git add v2/ | |
| git commit -m "Update posts from rss[bot]" || echo "No changes to commit" | |
| git push origin HEAD:output |