-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (38 loc) · 1.13 KB
/
update-blacklist.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
44
name: update-blacklist
on:
schedule:
- cron: '0 4 * * 0'
workflow_dispatch:
jobs:
update-blacklist:
runs-on: macos-latest
environment: update-blacklist
permissions:
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
cache-dependency-glob: uv.lock
python-version: 3.13
- name: Run Python script
env:
COOKIES_BASE64: ${{ secrets.COOKIES_BASE64 }}
BAHA_USERNAME: ${{ secrets.BAHA_USERNAME }}
run: uv run -m baha_blacklist.actions
- name: Commit and push changes
run: |
if [[ -n "$(git status --porcelain)" ]]; then
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add blacklist.txt
git commit -m "automated update" --no-verify
git push
else
echo "No changes to commit"
fi
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}