Skip to content

Commit

Permalink
Merge pull request #2 from polarityio/develop
Browse files Browse the repository at this point in the history
Updating Github Actions & Adding config.json
  • Loading branch information
penwoodjon authored Jan 23, 2023
2 parents b3f7357 + d0a9c62 commit 09f658b
Show file tree
Hide file tree
Showing 8 changed files with 482 additions and 64 deletions.
57 changes: 5 additions & 52 deletions .github/workflows/release-current-version.yml
Original file line number Diff line number Diff line change
@@ -1,58 +1,11 @@
# This workflow will run on merge of a PR or push to master
# It will run the integration developement checklist and if that passes
# creates a new release with the Release and Tag name both being the
# package.json version and will with a created tgz file and the SHA256 has in the release body


name: Release Current Version

on:
push:
branches: [ master ]
branches: [ master, main ]

jobs:
release-current-version:
runs-on: ubuntu-latest
container: 'centos:7'

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- name: Get NPM Version
id: package-version
uses: martinbeentjes/npm-get-version-action@95bc31c6dd3145896c110e382f840bb1e750d09c
- name: Create Build
id: create_build
run: |
npm install &&
cd .. &&
tar --exclude="./${{ github.event.repository.name }}/.git" --exclude="./${{ github.event.repository.name }}/.gitignore" --exclude="./${{ github.event.repository.name }}/package-lock.json" --exclude="./${{ github.event.repository.name }}/.github" -czvf "${{ github.event.repository.name }}-${{ steps.package-version.outputs.current-version }}.tgz" "./${{ github.event.repository.name }}" &&
echo "::set-output name=build_hash::$(sha256sum '${{ github.event.repository.name }}-${{ steps.package-version.outputs.current-version }}.tgz' | grep -oE '^[^ ]*' )" &&
cd ${{ github.event.repository.name }}
- name: Polarity Integration Development Checklist
id: int-dev-checklist
uses: polarityio/polarity-integration-development-checklist@v1.0.0
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create Versioned Release
id: create_versioned_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.package-version.outputs.current-version}}
release_name: ${{ steps.package-version.outputs.current-version}}
body: |
SHA256: ${{ steps.create_build.outputs.build_hash }}
draft: false
prerelease: false
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_versioned_release.outputs.upload_url }}
asset_path: ../${{ github.event.repository.name }}-${{ steps.package-version.outputs.current-version}}.tgz
asset_name: ${{ github.event.repository.name }}-${{ steps.package-version.outputs.current-version}}.tgz
asset_content_type: application/gzip
Run:
uses: polarityio/polarity-github-actions/.github/workflows/release-server-versions-for-int-store.yml@master
# with:
# use-integration-development-checklist: false
10 changes: 3 additions & 7 deletions .github/workflows/run-int-dev-checklist.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
# This workflow will run on a Pull Request is created on both master develop
# It run as series of checks from the Integration Developement Checklist


name: Run Integration Development Checklist

on:
pull_request:
branches: [ master, develop ]
branches: [ master, main, develop ]

jobs:
run-integration-development-checklist:
Expand All @@ -19,9 +15,9 @@ jobs:
- name: Test NPM Install
id: test-npm-install
run: |
npm install
npm ci
- name: Polarity Integration Development Checklist
id: int-dev-checklist
uses: polarityio/polarity-integration-development-checklist@v1.0.0
uses: polarityio/polarity-integration-development-checklist@main
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
31 changes: 31 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Ignore Maven Compiled Project Files
*/target/

# Ignore IntelliJ Project Information
*.iml
.idea/

# Ignore Sublime Text Project Files
*.sublime-project
*.sublime-workspace
sftp-config.json

# Ignore Eclipse Project Information
*.settings
*.project
*.classpath
dependency-reduced-pom.xml

# Ignore Excel Files
*.xlsx

# Ignore local log files
*.log
logs/
*.remote-sync.json

# Ignore Generated HTML README Files
README.html

# Ignored installed NPM modules
node_modules/
1 change: 1 addition & 0 deletions config/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ module.exports = {
regex: /CVE-\d{4}-\d{4,7}/
}
],
defaultColor: 'light-pink',
styles: ['./styles/styles.less'],
/**
* Provide custom component logic and template for rendering the integration details block. If you do not
Expand Down
65 changes: 65 additions & 0 deletions config/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
{
"name": "VulDB",
"acronym": "VULDB",
"description": "The Community Driven Vulnerability Database",
"customTypes": [
{
"key": "kb",
"regex": "KB\\s?[0-9]{7}"
},
{
"key": "cve",
"regex": "CVE-\\d{4}-\\d{4,7}"
}
],
"defaultColor": "light-pink",
"styles": ["./styles/styles.less"],
"block": {
"component": {
"file": "./components/block.js"
},
"template": {
"file": "./templates/block.hbs"
}
},
"summary": {
"component": {
"file": "./components/summary.js"
},
"template": {
"file": "./templates/summary.hbs"
}
},
"request": {
"cert": "",
"key": "",
"passphrase": "",
"ca": "",
"proxy": "",
"rejectUnauthorized": true
},
"logging": {
"level": "info"
},
"options": [
{
"key": "url",
"name": "VulDB API URL",
"description": "The base URL for the VulDB API including the schema (i.e., https://)",
"type": "text",
"default": "https://vuldb.com",
"userCanEdit": false,
"adminOnly": true
},
{
"key": "apiKey",
"name": "API Key",
"description": "Valid VulDB API Key.",
"default": "",
"type": "password",
"userCanEdit": true,
"adminOnly": false
}
],
"entityTypes": []
}
2 changes: 1 addition & 1 deletion integration.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';

const request = require('request');
const request = require('postman-request');
const config = require('./config/config');
const async = require('async');
const fs = require('fs');
Expand Down
Loading

0 comments on commit 09f658b

Please sign in to comment.