Skip to content

Process Feed Periodic Request #186

Process Feed Periodic Request

Process Feed Periodic Request #186

Workflow file for this run

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.'
})