Skip to content

Build filterlists

Build filterlists #892

Workflow file for this run

name: Build filterlists
on:
push:
branches: [ main ]
schedule:
- cron: "0 */6 * * *"
workflow_dispatch:
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Download script repo
uses: actions/checkout@v4
- name: Download release repo
uses: actions/checkout@v4
with:
ref: 'latest'
path: './dist'
- name: Running generation script
shell: bash
run: |
python ./convert.py 2>&1
- name: Check if update is necessary
continue-on-error: true
working-directory: ./dist
shell: bash
run: |
git log -1 --pretty=format:'%s' | grep -q $(cat README.md) && echo "IS_LATEST=true" >> $GITHUB_ENV
- name: Commit update
working-directory: ./dist
shell: bash
run: |
git config --local user.email "autoupdate@githubactions.com"
git config --local user.name "Github Action"
git add .
git commit -a -m $(cat README.md)
if: ${{ env.IS_LATEST == '' }}
- name: Push release repo
uses: ad-m/github-push-action@v0.8.0
with:
branch: 'latest'
directory: './dist'
if: ${{ env.IS_LATEST == '' }}