-
Notifications
You must be signed in to change notification settings - Fork 151
43 lines (39 loc) · 1.18 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
name: Add Rules to Cloudflare Gateway
on:
push:
schedule:
- cron: "0 0 * * *"
workflow_dispatch:
jobs:
run:
name: Cloudflare Gateway
permissions: write-all
runs-on: ubuntu-latest
timeout-minutes: 15
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CF_API_TOKEN: ${{ secrets.CF_API_TOKEN }}
CF_IDENTIFIER: ${{ secrets.CF_IDENTIFIER }}
ADLIST_URLS: ${{ vars.ADLIST_URLS }}
WHITELIST_URLS: ${{ vars.WHITELIST_URLS }}
DYNAMIC_BLACKLIST: ${{ vars.DYNAMIC_BLACKLIST }}
DYNAMIC_WHITELIST: ${{ vars.DYNAMIC_WHITELIST }}
steps:
- name: Checkout Repository
uses: actions/checkout@main
with:
fetch-depth: 0
- name: Install Python
uses: actions/setup-python@main
with:
python-version: 3.11
- name: Cache Data
id: cache-cloudflare
uses: actions/cache@main
with:
path: cloudflare_cache.json
key: ${{ runner.os }}-cloudflare-cache-${{ github.run_id }}
restore-keys: |
${{ runner.os }}-cloudflare-cache-
- name: Cloudflare Gateway Zero Trust
run: python -m src run