diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 19786fc..6647c32 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,44 +1,46 @@ -# on: -# push: -# branches: -# - main +on: + push: + branches: + - '**' -# jobs: -# release: -# name: Build GitHub Action -# runs-on: ubuntu-latest -# container: node:16 -# steps: -# - name: Install packages -# run: apt-get update && apt-get install -y rsync git -# - uses: actions/checkout@v2.3.1 -# - name: Install dependencies -# run: npm ci && npm install -g @vercel/ncc -# - name: Build release -# run: npm run lint && 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: NeuraLegion/run-discovery@push-node-version -# 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: ./release -# with: -# api_token: ${{ secrets.BRIGHTSEC_TOKEN }} -# discovery: ${{ steps.discovery.outputs.id }} +jobs: + release: + name: Build GitHub Action + runs-on: ubuntu-latest + container: node:20 + steps: + - name: Install packages + run: apt-get update && apt-get install -y rsync git + - uses: actions/checkout@v3 + - name: Install dependencies + run: npm ci && npm install -g @vercel/ncc + - name: Build release + run: npm run lint && 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: NeuraLegion/run-discovery@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: ./release + with: + api_token: ${{ secrets.BRIGHTSEC_TOKEN }} + discovery_id: ${{ steps.discovery.outputs.id }} + project_id: ${{ vars.PROJECT_ID }} + hostname: ${{ vars.HOSTNAME }}