mirror of
https://github.com/formbricks/formbricks.git
synced 2026-01-05 08:59:55 -06:00
Signed-off-by: StepSecurity Bot <bot@stepsecurity.io> Co-authored-by: Dhruwang Jariwala <67850763+Dhruwang@users.noreply.github.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: Dhruwang <dhruwangjariwala18@gmail.com> Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
34 lines
967 B
YAML
34 lines
967 B
YAML
name: Cron - Survey status update
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
# "Scheduled workflows run on the latest commit on the default or base branch."
|
|
# — https://docs.github.com/en/actions/learn-github-actions/events-that-trigger-workflows#schedule
|
|
schedule:
|
|
# Runs "At 00:00." (see https://crontab.guru)
|
|
- cron: "0 0 * * *"
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
cron-weeklySummary:
|
|
env:
|
|
APP_URL: ${{ secrets.APP_URL }}
|
|
CRON_SECRET: ${{ secrets.CRON_SECRET }}
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Harden the runner (Audit all outbound calls)
|
|
uses: step-security/harden-runner@v2
|
|
with:
|
|
egress-policy: audit
|
|
|
|
- name: cURL request
|
|
if: ${{ env.APP_URL && env.CRON_SECRET }}
|
|
run: |
|
|
curl ${{ env.APP_URL }}/api/cron/survey-status \
|
|
-X POST \
|
|
-H 'content-type: application/json' \
|
|
-H 'x-api-key: ${{ env.CRON_SECRET }}' \
|
|
--fail
|