Update Easylist assets (hourly) #36
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 Easylist assets (hourly) | |
on: | |
schedule: | |
- cron: "47 */3 * * *" | |
workflow_dispatch: | |
permissions: | |
contents: read | |
jobs: | |
publish: | |
if: github.repository_owner == 'uBlockOrigin' | |
permissions: | |
actions: write | |
contents: write # for Git to git push | |
name: Update Easylist assets | |
runs-on: ubuntu-latest | |
steps: | |
- name: Clone uAssets | |
uses: actions/checkout@v4 | |
- name: Assemble Easylist assets | |
run: | | |
./tools/make-easylist.sh | |
- name: Commit changes, if any | |
env: | |
GH_TOKEN: ${{ github.token }} | |
run: | | |
if [[ -n $(git diff) ]]; then | |
git config user.name "github-actions bot" | |
git config user.email "<>" | |
git add -u thirdparties/ | |
git commit -m "Update Easylist assets" | |
git pull --rebase origin master | |
git push origin master | |
gh workflow run main.yml | |
fi |