-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (61 loc) · 1.98 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: CI / Automated testing
on:
pull_request:
branches:
- '**'
jobs:
release:
name: Build GitHub Action
runs-on: ubuntu-latest
container: node:20
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: npm ci && npm install -g @vercel/ncc
- name: Build release
run: npm run build && npm run pack
- name: Copy files to release
run: |
mkdir release
cp README.md release/
cp action.yml release/
cp -R dist/ release/dist/
- name: Start Bright Discovery 🏁
id: discovery
uses: ./release
with:
api_token: ${{ secrets.BRIGHTSEC_TOKEN }}
name: GitHub discovery ${{ github.sha }}
project_id: ${{ vars.PROJECT_ID }}
hostname: ${{ vars.HOSTNAME }}
discovery_types: |
[ "crawler" ]
crawler_urls: |
[ "https://brokencrystals.com" ]
hosts_filter: |
[ ]
- name: Stop the discovery 🛑
id: stop
uses: NeuraLegion/stop-discovery@release
with:
api_token: ${{ secrets.BRIGHTSEC_TOKEN }}
discovery_id: ${{ steps.discovery.outputs.id }}
project_id: ${{ vars.PROJECT_ID }}
hostname: ${{ vars.HOSTNAME }}
- name: Rerun Bright Discovery 🏁
id: discovery-rerun
uses: ./release
with:
api_token: ${{ secrets.BRIGHTSEC_TOKEN }}
name: GitHub discovery rerun ${{ github.sha }}
project_id: ${{ vars.PROJECT_ID }}
hostname: ${{ vars.HOSTNAME }}
restart_discovery_id: ${{ steps.discovery.outputs.id }}
- name: Stop the restarted discovery 🛑
id: stop-rerun
uses: NeuraLegion/stop-discovery@release
with:
api_token: ${{ secrets.BRIGHTSEC_TOKEN }}
discovery_id: ${{ steps.discovery-rerun.outputs.id }}
project_id: ${{ vars.PROJECT_ID }}
hostname: ${{ vars.HOSTNAME }}