Skip to content

Commit 4a0a4f4

Browse files
author
Jon Penwood
authored
Merge pull request #7 from polarityio/develop
Updating Github Actions & Adding config.json
2 parents 92cc8a2 + 8873624 commit 4a0a4f4

File tree

6 files changed

+478
-64
lines changed

6 files changed

+478
-64
lines changed
Lines changed: 5 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,11 @@
1-
# This workflow will run on merge of a PR or push to master
2-
# It will run the integration developement checklist and if that passes
3-
# creates a new release with the Release and Tag name both being the
4-
# package.json version and will with a created tgz file and the SHA256 has in the release body
5-
6-
71
name: Release Current Version
82

93
on:
104
push:
11-
branches: [ master ]
5+
branches: [ master, main ]
126

137
jobs:
14-
release-current-version:
15-
runs-on: ubuntu-latest
16-
container: 'centos:7'
17-
18-
steps:
19-
- uses: actions/checkout@v2
20-
- uses: actions/setup-node@v1
21-
- name: Get NPM Version
22-
id: package-version
23-
uses: martinbeentjes/npm-get-version-action@95bc31c6dd3145896c110e382f840bb1e750d09c
24-
- name: Create Build
25-
id: create_build
26-
run: |
27-
npm install &&
28-
cd .. &&
29-
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 }}" &&
30-
echo "::set-output name=build_hash::$(sha256sum '${{ github.event.repository.name }}-${{ steps.package-version.outputs.current-version }}.tgz' | grep -oE '^[^ ]*' )" &&
31-
cd ${{ github.event.repository.name }}
32-
- name: Polarity Integration Development Checklist
33-
id: int-dev-checklist
34-
uses: polarityio/polarity-integration-development-checklist@v1.0.0
35-
with:
36-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
37-
- name: Create Versioned Release
38-
id: create_versioned_release
39-
uses: actions/create-release@v1
40-
env:
41-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
42-
with:
43-
tag_name: ${{ steps.package-version.outputs.current-version}}
44-
release_name: ${{ steps.package-version.outputs.current-version}}
45-
body: |
46-
SHA256: ${{ steps.create_build.outputs.build_hash }}
47-
draft: false
48-
prerelease: false
49-
- name: Upload Release Asset
50-
id: upload-release-asset
51-
uses: actions/upload-release-asset@v1
52-
env:
53-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
54-
with:
55-
upload_url: ${{ steps.create_versioned_release.outputs.upload_url }}
56-
asset_path: ../${{ github.event.repository.name }}-${{ steps.package-version.outputs.current-version}}.tgz
57-
asset_name: ${{ github.event.repository.name }}-${{ steps.package-version.outputs.current-version}}.tgz
58-
asset_content_type: application/gzip
8+
Run:
9+
uses: polarityio/polarity-github-actions/.github/workflows/release-server-versions-for-int-store.yml@master
10+
# with:
11+
# use-integration-development-checklist: false
Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
1-
# This workflow will run on a Pull Request is created on both master develop
2-
# It run as series of checks from the Integration Developement Checklist
3-
4-
51
name: Run Integration Development Checklist
62

73
on:
84
pull_request:
9-
branches: [ master, develop ]
5+
branches: [ master, main, develop ]
106

117
jobs:
128
run-integration-development-checklist:
@@ -19,9 +15,9 @@ jobs:
1915
- name: Test NPM Install
2016
id: test-npm-install
2117
run: |
22-
npm install
18+
npm ci
2319
- name: Polarity Integration Development Checklist
2420
id: int-dev-checklist
25-
uses: polarityio/polarity-integration-development-checklist@v1.0.0
21+
uses: polarityio/polarity-integration-development-checklist@main
2622
with:
2723
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

config/config.json

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
{
2+
"name": "HYAS Insight",
3+
"acronym": "HYAS",
4+
"description": "Searches Hyas Insight for information on hashes, ips and domains",
5+
"entityTypes": [
6+
"IPv4",
7+
"IPv6",
8+
"MD5",
9+
"domain",
10+
"email"
11+
],
12+
"customTypes": [
13+
{
14+
"key": "phone",
15+
"regex": "(((\\+\\d{1,2}|1)[\\s.-]?)?\\(?\\d{3}[)-.\\W]\\s?\\d{3}[-.\\W]\\d{4}?)|(\\d{7,14})"
16+
}
17+
],
18+
"defaultColor": "light-pink",
19+
"styles": [
20+
"./styles/hyas.less"
21+
],
22+
"block": {
23+
"component": {
24+
"file": "./components/block.js"
25+
},
26+
"template": {
27+
"file": "./templates/block.hbs"
28+
}
29+
},
30+
"summary": {
31+
"component": {
32+
"file": "./components/summary.js"
33+
},
34+
"template": {
35+
"file": "./templates/summary.hbs"
36+
}
37+
},
38+
"request": {
39+
"cert": "",
40+
"key": "",
41+
"passphrase": "",
42+
"ca": "",
43+
"proxy": "",
44+
"rejectUnauthorized": true
45+
},
46+
"logging": {
47+
"level": "info"
48+
},
49+
"onDemandOnly": true,
50+
"options": [
51+
{
52+
"key": "apiKey",
53+
"name": "API Key",
54+
"description": "HYAS Api Key",
55+
"default": "",
56+
"type": "password",
57+
"userCanEdit": true,
58+
"adminOnly": false
59+
},
60+
{
61+
"key": "blocklist",
62+
"name": "Block list Domains and IPs",
63+
"description": "List of domains and IPs that you never want to send to Hyas",
64+
"default": "",
65+
"type": "text",
66+
"userCanEdit": false,
67+
"adminOnly": false
68+
},
69+
{
70+
"key": "domainBlocklistRegex",
71+
"name": "Domain Block List Regex",
72+
"description": "Domains that match the given regex will not be looked up (if blank, no domains will be block listed)",
73+
"default": "",
74+
"type": "text",
75+
"userCanEdit": false,
76+
"adminOnly": false
77+
},
78+
{
79+
"key": "ipBlocklistRegex",
80+
"name": "IP Block List Regex",
81+
"description": "IPs that match the given regex will not be looked up (if blank, no IPs will be block listed)",
82+
"default": "",
83+
"type": "text",
84+
"userCanEdit": false,
85+
"adminOnly": false
86+
}
87+
]
88+
}

integration.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use strict';
22

3-
const request = require('request');
3+
const request = require('postman-request');
44
const _ = require('lodash');
55
const fp = require('lodash/fp');
66
const config = require('./config/config');

0 commit comments

Comments
 (0)