-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #54 from aitnitishshelage/script-update
Updated script for github action
- Loading branch information
Showing
3 changed files
with
59 additions
and
1 deletion.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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 11 * * 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/setup-node@v3.4.1 | ||
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!" |
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
File renamed without changes.