Update Easylist assets (hourly) #1745
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 */4 * * *" | |
workflow_dispatch: | |
permissions: | |
contents: read | |
jobs: | |
publish: | |
permissions: | |
contents: write # for Git to git push | |
name: Update Easylist assets | |
runs-on: ubuntu-latest | |
steps: | |
- name: Repo check | |
run: | | |
if [[ "$GITHUB_REPOSITORY_OWNER" != "uBlockOrigin" ]]; then | |
echo "This GitHub Action is meant to deliver filter lists for uBO." | |
echo "You shouldn't need to run this GitHub Action in your fork." | |
echo "If you do, please customize the cron expression above." | |
exit 1 | |
fi | |
exit 0 | |
- name: Clone uAssets | |
uses: actions/checkout@v3 | |
- name: Assemble Easylist assets | |
run: | | |
./tools/make-easylist.sh | |
- name: Commit changes, if any | |
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 push origin master | |
fi |