diff --git a/.github/workflows/renew-application-cache.yml b/.github/workflows/renew-application-cache.yml new file mode 100644 index 0000000..65c9185 --- /dev/null +++ b/.github/workflows/renew-application-cache.yml @@ -0,0 +1,20 @@ +name: Renew Cache + +on: + workflow_dispatch: + schedule: + # Schedule to run at 1 AM every day + - cron: '0 1 * * *' + +jobs: + renew_cache: + runs-on: ubuntu-latest + env: + BACKEND_URL: https://fp-core-prod.dp04sa0tdc6pk.us-east-1.cs.amazonlightsail.com + steps: + - name: Renew Application Cache + run: | + REPO_NAME=$(echo ${{ github.repository }} | cut -d'/' -f2) + curl -X POST "${BACKEND_URL}/application/cache/renewal" \ + -H "Content-Type: application/json" \ + -d '{"owner": "'${{ github.repository_owner }}'", "repo": "'$REPO_NAME'"}' \ No newline at end of file