-
Notifications
You must be signed in to change notification settings - Fork 2
51 lines (42 loc) · 1.35 KB
/
update-selectors.yml
File metadata and controls
51 lines (42 loc) · 1.35 KB
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
44
45
46
47
48
49
50
51
name: Update selectors
on:
schedule:
- cron: '0 6 * * 1'
workflow_dispatch:
jobs:
update:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Extract and merge selectors
run: python scripts/update_selectors.py update
- uses: actions/setup-node@v4
with:
node-version: '22'
- name: Install selector validator deps
working-directory: scripts/ci
run: npm ci --no-audit --no-fund
- name: Validate selectors in headless Chromium
run: node scripts/ci/validate.mjs --strict lists/generated/merged.txt
- name: Check for selector changes
id: diff
run: |
git diff --quiet -- \
'lists/generated/merged.txt' \
'lists/generated/upstream.txt' \
&& echo "changed=false" >> "$GITHUB_OUTPUT" \
|| echo "changed=true" >> "$GITHUB_OUTPUT"
- name: Create PR
if: steps.diff.outputs.changed == 'true'
uses: peter-evans/create-pull-request@v7
with:
title: 'chore: sync upstream selectors'
branch: update-selectors
labels: selectors
body: Auto-generated from upstream adblock lists.