Generate and deploy new list #56
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: Generate and deploy new list | |
on: | |
schedule: | |
- cron: '30 14 * * *' | |
push: | |
branches: | |
- master | |
jobs: | |
build-and-deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Generate list | |
run: bash ubuntu-generate-list.sh | |
- name: Commit updated file | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
REPO_NAME: ${{ github.repository }} | |
USERNAME: ${{ github.repository_owner }} | |
run: | | |
git checkout master | |
git config --local user.email "[email protected]" | |
git config --local user.name "GitHub Action" | |
git add -f blacklist | |
git commit -am "🤖 Blacklist update" || exit 0 | |
git remote set-url --push origin https://$USERNAME:[email protected]/$REPO_NAME | |
git push |