update-blacklist #19
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
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 }} |