Szcfna Monitor #136466
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: "Szcfna Monitor" | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "0/5 * * * *" | |
jobs: | |
check-house-status: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v1 | |
with: | |
node-version: '12.x' | |
- name: install packages | |
run: npm install | |
- name: check house status | |
run: node szcfna.js | |
- name: commit changes | |
run: | | |
if [ -n "$(git status -s)" ];then | |
git config --local user.email "action@github.com" | |
git config --local user.name "GitHub Action" | |
git add --all | |
git commit -m "Update data" -a | |
fi | |
- name: Push changes | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
branch: ${{ github.ref }} | |