Cron Dependency Checker Workflow #117
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: Cron Dependency Checker Workflow | |
on: | |
schedule: | |
- cron: '0 4 * * 1' | |
jobs: | |
cron-dependency-checker: | |
name: 'Cron Dependency Checker' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v2 | |
with: | |
token: ${{ secrets.MASTER_BRANCH_ACCESS_TOKEN }} | |
- name: Install Node | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 16 | |
- name: NPM Install | |
run: npm i | |
- name: Npm Outdated | |
run: npm run outdated | |
- name: Build | |
run: npm run build | |
- name: Check for Changes | |
run: | | |
if git diff --exit-code; then | |
echo "changes_exist=false" >> $GITHUB_ENV | |
else | |
echo "changes_exist=true" >> $GITHUB_ENV | |
fi | |
- name: Git Commit and Push | |
if: ${{ env.changes_exist == 'true' }} | |
run: | | |
git config --global user.email "98660390+oth-service-user@users.noreply.github.com" | |
git config --global user.name "OTH Service User" | |
git commit -am "Workflow/dependency check" | |
git push |