Skip to content

Commit

Permalink
chore: First Release
Browse files Browse the repository at this point in the history
  • Loading branch information
Kunal Nagar committed Aug 11, 2021
1 parent fd24226 commit 1f7512f
Show file tree
Hide file tree
Showing 10 changed files with 101 additions and 214 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: 'Continuous Deployment'

on:
push:
branches:
- main

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12
- name: Cache node modules
uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Install dependencies
run: npm install
- name: Build
run: npm run all
- name: Release
run: npm run release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
23 changes: 10 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
name: 'Continuous Integration'
# on:
# pull_request:
# types:
# - opened
# - edited
# - synchronize

on:
push:
branches:
- main
pull_request:
types:
- opened
- edited
- synchronize

jobs:
test:
Expand Down Expand Up @@ -37,7 +34,7 @@ jobs:
slack_webhook: ${{ secrets.SLACK_WEBHOOK }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# - name: Install dependencies
# run: npm install
# - name: Release (dry-run)
# run: npm run release -- --dry-run
- name: Install dependencies
run: npm install
- name: Release (dry-run)
run: npm run release -- --dry-run
29 changes: 29 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1 +1,30 @@
## @kunalnagarco/action-cve

A [GitHub action](https://github.com/features/actions) that sends Dependabot Vulnerability Alerts to multiple sources, starting with Slack.

### Usage

```yaml
name: 'Check for Vulnerabilities'

on:
schedule:
- cron: '0 */6 * * *' # every 6 hours

jobs:
main:
runs-on: ubuntu-latest
steps:
# X.X.X - Latest version available at:
# https://github.com/kunalnagarco/action-cve/releases
- uses: kunalnagarco/action-cve@vX.X.X
with:
# Create a Personal Access Token here:
# https://github.com/settings/tokens
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
# Create a Slack Incoming Webhook URL:
# https://slack.com/apps/A0F7XDUAZ-incoming-webhooks
slack_webhook: ${{ secrets.SLACK_WEBHOOK }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
```
8 changes: 4 additions & 4 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ description: 'Send GitHub vulnerability alerts to multiple platforms'
author: '@kunalnagarco'
inputs:
token:
description: 'GitHub token'
description: 'GitHub Personal Access Token'
slack_webhook:
required: true
description: 'Blah'
description: 'Slack Webhook URL'
branding:
icon: 'check-circle'
color: 'green'
icon: 'alert-octagon'
color: 'red'
runs:
using: 'node12'
main: 'dist/index.js'
13 changes: 9 additions & 4 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

Loading

0 comments on commit 1f7512f

Please sign in to comment.