Skip to content

Commit

Permalink
Merge pull request #54 from aitnitishshelage/script-update
Browse files Browse the repository at this point in the history
Updated script for github action
  • Loading branch information
iabmayank authored Aug 16, 2022
2 parents 6ecee9b + 230dd3a commit 4114441
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 1 deletion.
55 changes: 55 additions & 0 deletions .github/workflows/main.yml
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!"
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,13 @@
"@vue/cli-plugin-typescript": "^3.12.0",
"@vue/eslint-config-typescript": "^5.0.1",
"@vue/eslint-plugin": "^4.2.0",
"axios": "^0.27.2",
"babel-eslint": "^10.0.1",
"css-loader": "^3.2.1",
"eslint": "^5",
"eslint-plugin-vue": "^5.0.0",
"fibers": "^4.0.1",
"fs": "^0.0.1-security",
"html-webpack-plugin": "^3.2.0",
"lint-staged": "^8.1.5",
"mocha": "^6.2.2",
Expand All @@ -76,11 +78,12 @@
"ts-node": "^8.5.4",
"typescript": "^3.7.3",
"url-loader": "^3.0.0",
"util": "^0.12.4",
"vue-loader": "^15.7.2",
"vue-template-compiler": "^2.6.10",
"vue-ts-plugin": "^0.1.0",
"webpack": "^4.41.2",
"webpack-cli": "^3.3.10",
"webpack-dev-server": "^3.9.0"
}
}
}
File renamed without changes.

0 comments on commit 4114441

Please sign in to comment.