2026-03-15 21:06:58 +08:00
2026-03-15 21:06:58 +08:00
2026-03-15 20:58:09 +08:00
2026-03-15 21:06:58 +08:00

card-api

GitHub Action: daily task

This repository includes a scheduled GitHub Action at .github/workflows/daily-task.yml.

Trigger mode

  • Runs every day at 02:00 UTC
  • Can also be started manually from the GitHub Actions page

Required configuration

Configure these repository secrets before enabling the workflow:

  • TARGET_URL: target API endpoint to call

Optional secrets:

  • AUTH_TOKEN: bearer token appended to the Authorization header
  • REQUEST_BODY: raw JSON string sent as the request body
  • HEADERS_JSON: JSON object string for extra request headers

Optional repository variables:

  • HTTP_METHOD: defaults to GET
  • EXPECTED_STATUS: defaults to 200
  • RETRY_COUNT: defaults to 3
  • RETRY_DELAY_MS: defaults to 5000

Behavior

The workflow runs scripts/daily-task.js, which:

  • calls the configured endpoint
  • validates the returned status code
  • retries on failure
  • exits with a non-zero code when all retries fail

If you want this action to do something more specific, such as syncing data, generating reports, or updating files in the repository, the script can be extended from the same entry point.

Description
No description provided
Readme MIT 27 KiB
Languages
JavaScript 100%