Process Feed Periodic Request #186
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: Process Feed Periodic Request | |
| on: | |
| schedule: | |
| - cron: '45 16 * * *' | |
| workflow_dispatch: # Allows manual triggering | |
| jobs: | |
| process-feed: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Make API Request | |
| run: | | |
| response=$(curl -s -w "\n%{http_code}" ${{ secrets.API_URL }}/api/process-feed) | |
| status_code=$(echo "$response" | tail -n1) | |
| body=$(echo "$response" | sed '$d') | |
| echo "Response body: $body" | |
| echo "Status code: $status_code" | |
| if [ "$status_code" -ne 200 ]; then | |
| echo "Error: API request failed" | |
| exit 1 | |
| fi | |
| env: | |
| API_URL: ${{ secrets.API_URL }} | |
| - name: Notify on Failure | |
| if: failure() | |
| uses: actions/github-script@v7 | |
| with: | |
| script: | | |
| github.rest.issues.create({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| title: 'Feed Processing Failed', | |
| body: 'The automated feed processing job failed. Please check the workflow logs for details.' | |
| }) |