Skip to content

Commit

Permalink
workflow: add update core/npm indexes
Browse files Browse the repository at this point in the history
  • Loading branch information
RafaelGSS committed Jan 28, 2023
1 parent b9e0ff5 commit 535ce46
Show file tree
Hide file tree
Showing 2 changed files with 76 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/update-core-index.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: "Update core index.json"
on:
push:
branches:
- main
paths:
- 'vuln/core/*.json'
- '!vuln/core/index.json'

permissions: [read, write]

jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- uses: actions/setup-node@v3
with:
node-version: 18

- name: Install deps
run: |
npm install
- name: Update core index.json
run: |
npm run update-core-index
- name: commit and push updated results
uses: github-actions-x/commit@v2.9
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
push-branch: 'main'
commit-message: 'vuln: update core index.json'
rebase: 'true'
files: vuln/core/index.json
name: Github Actions
38 changes: 38 additions & 0 deletions .github/workflows/update-npm-index.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: "Update npm index.json"
on:
push:
branches:
- main
paths:
- 'vuln/npm/*.json'
- '!vuln/npm/index.json'

permissions: [read, write]

jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- uses: actions/setup-node@v3
with:
node-version: 18

- name: Install deps
run: |
npm install
- name: Update npm index.json
run: |
npm run update-npm-index
- name: commit and push updated results
uses: github-actions-x/commit@v2.9
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
push-branch: 'main'
commit-message: 'vuln: update npm index.json'
rebase: 'true'
files: vuln/npm/index.json
name: Github Actions

0 comments on commit 535ce46

Please sign in to comment.