Auto build new list #560
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: Auto build new list | |
on: | |
schedule: | |
- cron: "20 1 */2 * *" | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: co master | |
uses: actions/checkout@v3 | |
with: | |
ref: 'master' | |
- name: Run start.sh | |
run: | | |
./scripts/start.sh | |
- name: Commit files | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "GitHub Action" | |
git add . -u | |
if [[ -z $(git status -s) ]]; then | |
echo "There are no changes in the commit step." && exit 0 | |
fi | |
git commit -m "Auto renew list." -a | |
- name: Push changes | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.PERSON_TOKEN }} | |
branch: 'master' |