Sync Catalog #51
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: Sync Catalog | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: '0 */2 * * *' | |
| jobs: | |
| sync: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Trigger catalog refresh | |
| run: | | |
| HTTP_CODE=$(curl -s -o /tmp/response.txt -w "%{http_code}" -X POST \ | |
| -H "Authorization: Bearer ${{ secrets.CNB_NPM_TOKEN }}" \ | |
| "https://gameframex.upm.alianblank.uk/-/refresh") | |
| echo "HTTP status: $HTTP_CODE" | |
| cat /tmp/response.txt | |
| if [ "$HTTP_CODE" -ne 200 ]; then | |
| echo "::error::Catalog refresh failed with HTTP $HTTP_CODE" | |
| exit 1 | |
| fi | |
| echo "Catalog sync completed successfully" |