forked from luxysiv/Cloudflare-Gateway-Pihole
-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (36 loc) · 1.23 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
name: Add Rules to Cloudflare Gateway
on:
schedule:
- cron: '0 2 * * *' # Запуск каждый день в два часа ночи
workflow_dispatch: # Позволяет запускать рабочий процесс вручную
jobs:
run:
name: Cloudflare Gateway
permissions: write-all
runs-on: ubuntu-latest
timeout-minutes: 15
env:
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: Cloudflare Gateway Zero Trust
run: python -m src run
- name: Delete workflow runs
uses: Mattraks/delete-workflow-runs@v2
with:
token: ${{ github.token }}
repository: ${{ github.repository }}
retain_days: 0
keep_minimum_runs: 1