forked from sieusus/lilac-gateway-pihole
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Kay
authored
Oct 11, 2023
1 parent
5b63e9e
commit cb89873
Showing
1 changed file
with
66 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
name: Update Filter Lists | ||
|
||
on: | ||
schedule: | ||
- cron: "0 21 * * *" | ||
push: | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
env: | ||
NODE_ENV: production | ||
|
||
jobs: | ||
LLGP: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: "lts/*" | ||
|
||
- name: Install npm dependencies | ||
run: npm ci | ||
|
||
- name: Download allowlists | ||
run: npm run download:allowlist | ||
env: | ||
ALLOWLIST_URLS: ${{ vars.ALLOWLIST_URLS }} | ||
|
||
- name: Download blocklists | ||
run: npm run download:blocklist | ||
env: | ||
BLOCKLIST_URLS: ${{ vars.BLOCKLIST_URLS }} | ||
|
||
- name: Delete old rules and lists | ||
run: npm run cloudflare-delete | ||
env: | ||
CLOUDFLARE_API_KEY: ${{ secrets.CLOUDFLARE_API_KEY }} | ||
CLOUDFLARE_ACCOUNT_EMAIL: ${{ secrets.CLOUDFLARE_ACCOUNT_EMAIL }} | ||
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | ||
CLOUDFLARE_LIST_ITEM_LIMIT: ${{ secrets.CLOUDFLARE_LIST_ITEM_LIMIT }} | ||
FAST_MODE: ${{ vars.FAST_MODE }} | ||
|
||
- name: Create new rules and lists | ||
run: npm run cloudflare-create | ||
env: | ||
CLOUDFLARE_API_KEY: ${{ secrets.CLOUDFLARE_API_KEY }} | ||
CLOUDFLARE_ACCOUNT_EMAIL: ${{ secrets.CLOUDFLARE_ACCOUNT_EMAIL }} | ||
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | ||
CLOUDFLARE_LIST_ITEM_LIMIT: ${{ secrets.CLOUDFLARE_LIST_ITEM_LIMIT }} | ||
FAST_MODE: ${{ vars.FAST_MODE }} | ||
|
||
- name: Send ping request | ||
if: env.PING_URL != '' | ||
run: | | ||
curl "${{ env.PING_URL }}" | ||
env: | ||
PING_URL: ${{ secrets.PING_URL }} |