Python application #904
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
# This workflow will install Python dependencies, run tests and lint with a single version of Python | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | |
name: Python application | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "0 2 * * 1-5" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python 3.9 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.9 | |
- name: Build Blocklist | |
run: | | |
python generate-domains-blocklist.py -o dnscrypt-blocklist-domains.txt | |
- name: Check for modified files | |
id: git-check | |
run: echo ::set-output name=modified::$([ -z "`git status --porcelain`" ] && echo "false" || echo "true") | |
- name: Commit | |
if: steps.git-check.outputs.modified == 'true' | |
run: | | |
git config --global user.name '${{ github.actor }} via Bot' | |
git config --global user.email '${{ github.actor }}@users.noreply.github.com' | |
git add . | |
git commit -am "Release" | |
git push |