From 870c81478f2ebe73f73df16315c89ba75121e489 Mon Sep 17 00:00:00 2001 From: Alan Shaw Date: Mon, 4 Apr 2022 14:33:47 +0100 Subject: [PATCH] feat: add deny list sync cron job (#1759) resolves #1738 --- .github/workflows/cron-denylist.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/cron-denylist.yml diff --git a/.github/workflows/cron-denylist.yml b/.github/workflows/cron-denylist.yml new file mode 100644 index 0000000000..41a478d5a8 --- /dev/null +++ b/.github/workflows/cron-denylist.yml @@ -0,0 +1,25 @@ +name: Cron sync deny list + +on: + schedule: + - cron: '13 8 * * *' + workflow_dispatch: + +jobs: + update: + name: Sync deny list with KV store + runs-on: ubuntu-latest + strategy: + matrix: + env: ['staging', 'production'] + timeout-minutes: 20 + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 + with: + node-version: 16 + - uses: bahmutov/npm-install@v1 + - name: Run job + env: + CF_API_TOKEN: ${{ secrets.CF_GATEWAY_TOKEN }} + run: node packages/gateway/scripts/cli.js denylist sync --env ${{ matrix.env }}