generated from open-template-hub/web-ui-template
-
Notifications
You must be signed in to change notification settings - Fork 10
43 lines (37 loc) · 1.1 KB
/
cron-dependency-checker-workflow.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
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 buildProd
- 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