-
Notifications
You must be signed in to change notification settings - Fork 19
55 lines (46 loc) · 1.71 KB
/
main.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
44
45
46
47
48
49
50
51
52
53
54
55
# This is a basic workflow to help you get started with Actions
name: GVLUPDATE
# Controls when the workflow will run
on:
# Runs on pushes targeting the default branch
schedule:
- cron: "0 17 * * 4"
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
cron:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout source code
uses: actions/checkout@v2
with:
token: ${{ secrets.PAT }}
- name: Use Node.js 13.3.1
uses: actions/[email protected]
with:
node-version: 13.3.0
- name: Run GVL node file
run: |
npm install
node update-vendor-list.js
git status
- name: Updating code
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Updated GVL data list to latest version
branch: master
status_options: '--untracked-files=no'
add_options: '-u'
skip_dirty_check: true
skip_fetch: true
skip_checkout: true
create_branch: true
- name: "Run if changes have been detected"
if: steps.auto-commit-action.outputs.changes_detected == 'true'
run: echo "Files updated successfully!"
- name: "Run if no changes have been detected"
if: steps.auto-commit-action.outputs.changes_detected == 'false'
run: echo "No changes detected!"