.github/workflows/run.yml #893
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
on: | |
push: | |
branches: | |
- master | |
- main | |
schedule: | |
- cron: '0 0 * * *' | |
jobs: | |
check: | |
name: Check for changes in file | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 # Checking out the repo | |
- name: Setup Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: "3.10" | |
- name: Install pipenv | |
run: | | |
python -m pip install --upgrade pipenv wheel | |
- id: cache-pipenv | |
uses: actions/cache@v1 | |
with: | |
path: ~/.local/share/virtualenvs | |
key: ${{ runner.os }}-pipenv-${{ hashFiles('**/Pipfile.lock') }} | |
- name: Install dependencies | |
if: steps.cache-pipenv.outputs.cache-hit != 'true' | |
run: | | |
pipenv install --deploy --dev | |
- name: Run check | |
run: | | |
pipenv run python app.py check --slack ${{secrets.SLACK_HOOK_AT}} --mastodon-access-token ${{secrets.MASTODON_TOKEN}} --mastodon-api-base-url ${{secrets.MASTODON_URL}} | |
- name: Run tree | |
run: | | |
pipenv run python app.py tree | |
- name: Commit and push changes | |
run: | | |
git config --global user.name "wytamma" | |
git config --global user.email "wytamma.wirth@me.com" | |
if [ "$(git status --porcelain | head -1)" ] | |
then | |
git add -A | |
git commit -m ":tada: Changes Found!" | |
git push | |
fi |