Skip to content

Cron Dependency Checker Workflow #129

Cron Dependency Checker Workflow

Cron Dependency Checker Workflow #129

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