From 8445a69a57067d8db6cba6e0a63edbf7c48d6936 Mon Sep 17 00:00:00 2001 From: guylev008 Date: Tue, 10 May 2022 15:37:42 +0300 Subject: [PATCH 01/10] install and run --- .github/workflows/main.yml | 8 ++++---- index.js | 9 +++++++++ 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f2027af..51cea3b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,6 +1,6 @@ name: CI -# Controls when the workflow will run +# Controls when the workflow will run on: [push, workflow_dispatch] env: @@ -12,12 +12,12 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - name: Install Spectral + - name: Install and run Spectral uses: spectralops/spectral-github-action@v1 with: spectral-dsn: ${{ secrets.SPECTRAL_DSN }} - - name: Spectral Scan - run: spectral scan + spectral-args: --ok --include-tags base,audit,iac + macOS: name: Spectral macOS runs-on: macos-latest diff --git a/index.js b/index.js index c4f1f69..75bf077 100644 --- a/index.js +++ b/index.js @@ -1,6 +1,7 @@ const core = require('@actions/core'); const io = require('@actions/io'); const tc = require('@actions/tool-cache'); +const { execSync } = require('child_process'); const workspace = process.env.GITHUB_WORKSPACE; const binDir = `${workspace}/bin`; @@ -25,6 +26,7 @@ async function main() { } await core.addPath(binDir) + runSpectral() } async function downloadTool(platform) { @@ -43,4 +45,11 @@ async function installExecutable(path) { await io.mkdirP(path); const downloadPath = await downloadTool('exe') await io.mv(downloadPath, `${path}/spectral.exe`) +} + +function runSpectral() { + const spectralArgs = core.getInput('spectral-args') + const spectralCommand = `${process.platform === 'win32' ? 'spectral.exe scan' : 'spectral scan'} ${spectralArgs}` + process.stdout = execSync(spectralCommand) + console.log(Buffer.from(stdout).toString("utf-8")) } \ No newline at end of file From 4d59cc32289f3942c12e131170e3b56b647bf8e3 Mon Sep 17 00:00:00 2001 From: guylev008 Date: Tue, 10 May 2022 15:39:31 +0300 Subject: [PATCH 02/10] add args to action --- action.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/action.yml b/action.yml index f29ef1c..75b7312 100644 --- a/action.yml +++ b/action.yml @@ -4,6 +4,9 @@ inputs: spectral-dsn: description: "Your Spectral DSN" required: true + spectral-args: + description: "Arguments for Spectral scan" + required: false branding: icon: "download" color: "purple" From 073566ef18531aca44f3a10e886360fe02e21254 Mon Sep 17 00:00:00 2001 From: guylev008 Date: Tue, 10 May 2022 16:17:35 +0300 Subject: [PATCH 03/10] update workflow --- .github/workflows/main.yml | 6 +++--- index.js | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 51cea3b..db1a777 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -13,7 +13,7 @@ jobs: steps: - uses: actions/checkout@v2 - name: Install and run Spectral - uses: spectralops/spectral-github-action@v1 + uses: spectralops/spectral-github-action@v2 with: spectral-dsn: ${{ secrets.SPECTRAL_DSN }} spectral-args: --ok --include-tags base,audit,iac @@ -24,7 +24,7 @@ jobs: steps: - uses: actions/checkout@v2 - name: Install Spectral - uses: spectralops/spectral-github-action@v1 + uses: spectralops/spectral-github-action@v2 with: spectral-dsn: ${{ secrets.SPECTRAL_DSN }} - name: Spectral Scan @@ -35,7 +35,7 @@ jobs: steps: - uses: actions/checkout@v2 - name: Install Spectral - uses: spectralops/spectral-github-action@v1 + uses: spectralops/spectral-github-action@v2 with: spectral-dsn: ${{ secrets.SPECTRAL_DSN }} - name: Spectral Scan diff --git a/index.js b/index.js index 75bf077..e2d5a7f 100644 --- a/index.js +++ b/index.js @@ -49,7 +49,7 @@ async function installExecutable(path) { function runSpectral() { const spectralArgs = core.getInput('spectral-args') - const spectralCommand = `${process.platform === 'win32' ? 'spectral.exe scan' : 'spectral scan'} ${spectralArgs}` - process.stdout = execSync(spectralCommand) - console.log(Buffer.from(stdout).toString("utf-8")) + const spectralCommand = `${process.platform === 'win32' ? 'spectral.exe scan' : 'spectral scan'} ${spectralArgs || ''}` + const output = execSync(spectralCommand) + console.log(Buffer.from(output).toString("utf-8")) } \ No newline at end of file From 07adfaa635e413f25886c5fd7e89cd7b136e9f90 Mon Sep 17 00:00:00 2001 From: guylev008 Date: Tue, 10 May 2022 16:18:55 +0300 Subject: [PATCH 04/10] update workflow --- .github/workflows/main.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index db1a777..ad63452 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -16,7 +16,7 @@ jobs: uses: spectralops/spectral-github-action@v2 with: spectral-dsn: ${{ secrets.SPECTRAL_DSN }} - spectral-args: --ok --include-tags base,audit,iac + spectral-args: --ok macOS: name: Spectral macOS @@ -27,6 +27,7 @@ jobs: uses: spectralops/spectral-github-action@v2 with: spectral-dsn: ${{ secrets.SPECTRAL_DSN }} + spectral-args: --ok - name: Spectral Scan run: spectral scan windows: @@ -38,5 +39,6 @@ jobs: uses: spectralops/spectral-github-action@v2 with: spectral-dsn: ${{ secrets.SPECTRAL_DSN }} + spectral-args: --ok - name: Spectral Scan run: spectral.exe scan From 33c4f4dc8bc07e8d2d5d8ef35d77e37b47558165 Mon Sep 17 00:00:00 2001 From: guylev008 Date: Fri, 13 May 2022 15:52:49 +0300 Subject: [PATCH 05/10] install and run spectral in a single command with an option to run a ci or audit scan --- .github/workflows/main.yml | 73 +++++++++++++++++++++++++++----------- README.md | 35 +++++++++++++++--- action.yml | 4 +++ index.js | 32 ++++++++++++----- 4 files changed, 111 insertions(+), 33 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ad63452..da440cc 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -7,38 +7,69 @@ env: SPECTRAL_DSN: ${{ secrets.SPECTRAL_DSN }} jobs: - ubuntu: - name: Spectral ubuntu + ubuntu-ci: + name: Spectral ubuntu CI runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - name: Install and run Spectral - uses: spectralops/spectral-github-action@v2 + - name: Install and run Spectral CI + uses: ./ with: - spectral-dsn: ${{ secrets.SPECTRAL_DSN }} + spectral-dsn: $SPECTRAL_DSN spectral-args: --ok - - macOS: - name: Spectral macOS - runs-on: macos-latest + scan-type: "CI" + ubuntu-audit: + name: Spectral ubuntu audit + runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - name: Install Spectral - uses: spectralops/spectral-github-action@v2 + - name: Install and run Spectral Audit + uses: ./ with: - spectral-dsn: ${{ secrets.SPECTRAL_DSN }} + spectral-dsn: $SPECTRAL_DSN + spectral-args: github -k repo -t ${{ secrets.MY_GITHUB_TOKEN }} https://github.com/SpectralOps/spectral-github-action --include-tags base,audit --ok + scan-type: "Audit" + macos-ci: + name: Spectral macos CI + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Install and run Spectral CI + uses: ./ + with: + spectral-dsn: $SPECTRAL_DSN spectral-args: --ok - - name: Spectral Scan - run: spectral scan - windows: - name: Spectral windows + scan-type: "CI" + macos-audit: + name: Spectral macos audit + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Install and run Spectral Audit + uses: ./ + with: + spectral-dsn: $SPECTRAL_DSN + spectral-args: github -k repo -t ${{ secrets.MY_GITHUB_TOKEN }} https://github.com/SpectralOps/spectral-github-action --include-tags base,audit --ok + scan-type: "Audit" + windows-ci: + name: Spectral windows CI runs-on: windows-latest steps: - uses: actions/checkout@v2 - - name: Install Spectral - uses: spectralops/spectral-github-action@v2 + - name: Install and run Spectral CI + uses: ./ with: - spectral-dsn: ${{ secrets.SPECTRAL_DSN }} + spectral-dsn: $SPECTRAL_DSN spectral-args: --ok - - name: Spectral Scan - run: spectral.exe scan + scan-type: "CI" + windows-audit: + name: Spectral windows audit + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + - name: Install and run Spectral Audit + uses: ./ + with: + spectral-dsn: $SPECTRAL_DSN + spectral-args: github -k repo -t ${{ secrets.MY_GITHUB_TOKEN }} https://github.com/SpectralOps/spectral-github-action --include-tags base,audit --ok + scan-type: "Audit" diff --git a/README.md b/README.md index 0c0d562..9e0d406 100644 --- a/README.md +++ b/README.md @@ -22,9 +22,11 @@ Spectral Scan is a single self-contained binary, that's easy to get and use. Thi Include this Action as a step in your workflow: ``` -uses: spectral/spectral-action@v1 +uses: spectral/spectral-action@v2 with: - spectral-dsn: ${{ secrets.SPECTRAL_DSN }} + spectral-dsn: $SPECTRAL_DSN + spectral-args: --ok + scan-type: "CI" ``` You can see an example of this Action [here](https://github.com/SpectralOps/spectral-github-action/tree/main/.github/workflows/main.yml) @@ -47,13 +49,38 @@ jobs: steps: - uses: actions/checkout@v2 - name: Install Spectral - uses: spectralops/spectral-github-action@v1 + uses: spectralops/spectral-github-action@v2 with: - spectral-dsn: ${{ secrets.SPECTRAL_DSN }} + spectral-dsn: $SPECTRAL_DSN + spectral-args: --ok - name: Spectral Scan run: spectral scan ``` +Spectral provides another scan option to audit your Github/Gitlab organizaion, user or repo. +Notice that you need to provide the audit scan type. + +```yaml +name: Spectral + +on: [push] + +env: + SPECTRAL_DSN: ${{ secrets.SPECTRAL_DSN }} + +jobs: + scan: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Install and run Spectral Audit + uses: spectralops/spectral-github-action@v2 + with: + spectral-dsn: ${{ secrets.SPECTRAL_DSN }} + spectral-args: github -k repo -t ${{ secrets.MY_GITHUB_TOKEN }} https://github.com/SpectralOps/spectral-github-action --include-tags base,audit --ok + scan-type: "audit" +``` + ### How to Contribute We welcome [issues](https://github.com/SpectralOps/spectral-github-action/issues) to and [pull requests](https://github.com/SpectralOps/spectral-github-action/pulls) against this repository! diff --git a/action.yml b/action.yml index 75b7312..46655e8 100644 --- a/action.yml +++ b/action.yml @@ -7,6 +7,10 @@ inputs: spectral-args: description: "Arguments for Spectral scan" required: false + scan-type: + description: "CI or audit" + default: "CI" + required: false branding: icon: "download" color: "purple" diff --git a/index.js b/index.js index e2d5a7f..24d988d 100644 --- a/index.js +++ b/index.js @@ -1,9 +1,10 @@ const core = require('@actions/core'); const io = require('@actions/io'); const tc = require('@actions/tool-cache'); -const { execSync } = require('child_process'); +const exec = require("@actions/exec").exec; const workspace = process.env.GITHUB_WORKSPACE; +const spectralDsn = core.getInput('spectral-dsn') const binDir = `${workspace}/bin`; main().catch(error => { @@ -22,15 +23,14 @@ async function main() { await installZip(binDir, 'mac') break; default: - break; + throw new Error(`Platform: ${process.platform} is not supported`); } await core.addPath(binDir) - runSpectral() + await runSpectral() } async function downloadTool(platform) { - const spectralDsn = core.getInput('spectral-dsn') const url = `${spectralDsn}/latest/dl/${platform}` return await tc.downloadTool(url); } @@ -47,9 +47,25 @@ async function installExecutable(path) { await io.mv(downloadPath, `${path}/spectral.exe`) } -function runSpectral() { +async function runSpectral() { + const scanCommand = getScanCommand() + await exec(scanCommand) +} + +function getScanCommand() { + const scanType = core.getInput('scan-type') const spectralArgs = core.getInput('spectral-args') - const spectralCommand = `${process.platform === 'win32' ? 'spectral.exe scan' : 'spectral scan'} ${spectralArgs || ''}` - const output = execSync(spectralCommand) - console.log(Buffer.from(output).toString("utf-8")) + switch (scanType.toLowerCase()) { + case 'ci': + return `${process.platform === 'win32' ? 'spectral.exe scan' : 'spectral scan'} ${spectralArgs}` + case 'audit': + if (process.platform === win32) { + return `spectral.exe ${spectralArgs}` + } + else { + return `spectral ${spectralArgs}` + } + default: + throw new Error(`Unknown scan type: ${scanType}`); + } } \ No newline at end of file From 38a9c3b0a62b170fdaa25af6bd44d7f1ebd9cd1d Mon Sep 17 00:00:00 2001 From: guylev008 Date: Fri, 13 May 2022 18:03:55 +0300 Subject: [PATCH 06/10] clean --- .github/workflows/main.yml | 18 ++++++------------ README.md | 3 --- action.yml | 4 ---- index.js | 15 +-------------- 4 files changed, 7 insertions(+), 33 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index da440cc..15759b9 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -15,9 +15,8 @@ jobs: - name: Install and run Spectral CI uses: ./ with: - spectral-dsn: $SPECTRAL_DSN + spectral-dsn: ${{ secrets.SPECTRAL_DSN }} spectral-args: --ok - scan-type: "CI" ubuntu-audit: name: Spectral ubuntu audit runs-on: ubuntu-latest @@ -26,9 +25,8 @@ jobs: - name: Install and run Spectral Audit uses: ./ with: - spectral-dsn: $SPECTRAL_DSN + spectral-dsn: ${{ secrets.SPECTRAL_DSN }} spectral-args: github -k repo -t ${{ secrets.MY_GITHUB_TOKEN }} https://github.com/SpectralOps/spectral-github-action --include-tags base,audit --ok - scan-type: "Audit" macos-ci: name: Spectral macos CI runs-on: ubuntu-latest @@ -37,9 +35,8 @@ jobs: - name: Install and run Spectral CI uses: ./ with: - spectral-dsn: $SPECTRAL_DSN + spectral-dsn: ${{ secrets.SPECTRAL_DSN }} spectral-args: --ok - scan-type: "CI" macos-audit: name: Spectral macos audit runs-on: ubuntu-latest @@ -48,9 +45,8 @@ jobs: - name: Install and run Spectral Audit uses: ./ with: - spectral-dsn: $SPECTRAL_DSN + spectral-dsn: ${{ secrets.SPECTRAL_DSN }} spectral-args: github -k repo -t ${{ secrets.MY_GITHUB_TOKEN }} https://github.com/SpectralOps/spectral-github-action --include-tags base,audit --ok - scan-type: "Audit" windows-ci: name: Spectral windows CI runs-on: windows-latest @@ -59,9 +55,8 @@ jobs: - name: Install and run Spectral CI uses: ./ with: - spectral-dsn: $SPECTRAL_DSN + spectral-dsn: ${{ secrets.SPECTRAL_DSN }} spectral-args: --ok - scan-type: "CI" windows-audit: name: Spectral windows audit runs-on: windows-latest @@ -70,6 +65,5 @@ jobs: - name: Install and run Spectral Audit uses: ./ with: - spectral-dsn: $SPECTRAL_DSN + spectral-dsn: ${{ secrets.SPECTRAL_DSN }} spectral-args: github -k repo -t ${{ secrets.MY_GITHUB_TOKEN }} https://github.com/SpectralOps/spectral-github-action --include-tags base,audit --ok - scan-type: "Audit" diff --git a/README.md b/README.md index 9e0d406..6013579 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,6 @@ uses: spectral/spectral-action@v2 with: spectral-dsn: $SPECTRAL_DSN spectral-args: --ok - scan-type: "CI" ``` You can see an example of this Action [here](https://github.com/SpectralOps/spectral-github-action/tree/main/.github/workflows/main.yml) @@ -58,7 +57,6 @@ jobs: ``` Spectral provides another scan option to audit your Github/Gitlab organizaion, user or repo. -Notice that you need to provide the audit scan type. ```yaml name: Spectral @@ -78,7 +76,6 @@ jobs: with: spectral-dsn: ${{ secrets.SPECTRAL_DSN }} spectral-args: github -k repo -t ${{ secrets.MY_GITHUB_TOKEN }} https://github.com/SpectralOps/spectral-github-action --include-tags base,audit --ok - scan-type: "audit" ``` ### How to Contribute diff --git a/action.yml b/action.yml index 46655e8..75b7312 100644 --- a/action.yml +++ b/action.yml @@ -7,10 +7,6 @@ inputs: spectral-args: description: "Arguments for Spectral scan" required: false - scan-type: - description: "CI or audit" - default: "CI" - required: false branding: icon: "download" color: "purple" diff --git a/index.js b/index.js index 24d988d..f9fe457 100644 --- a/index.js +++ b/index.js @@ -53,19 +53,6 @@ async function runSpectral() { } function getScanCommand() { - const scanType = core.getInput('scan-type') const spectralArgs = core.getInput('spectral-args') - switch (scanType.toLowerCase()) { - case 'ci': - return `${process.platform === 'win32' ? 'spectral.exe scan' : 'spectral scan'} ${spectralArgs}` - case 'audit': - if (process.platform === win32) { - return `spectral.exe ${spectralArgs}` - } - else { - return `spectral ${spectralArgs}` - } - default: - throw new Error(`Unknown scan type: ${scanType}`); - } + return `${process.platform === 'win32' ? 'spectral.exe scan' : 'spectral scan'} ${spectralArgs}` } \ No newline at end of file From c8f52b12d51cbe857ec57a45351ef674c0a51062 Mon Sep 17 00:00:00 2001 From: guylev008 Date: Fri, 13 May 2022 18:07:07 +0300 Subject: [PATCH 07/10] fix command --- .github/workflows/main.yml | 6 +++--- index.js | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 15759b9..ca34854 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -16,7 +16,7 @@ jobs: uses: ./ with: spectral-dsn: ${{ secrets.SPECTRAL_DSN }} - spectral-args: --ok + spectral-args: scan --ok ubuntu-audit: name: Spectral ubuntu audit runs-on: ubuntu-latest @@ -36,7 +36,7 @@ jobs: uses: ./ with: spectral-dsn: ${{ secrets.SPECTRAL_DSN }} - spectral-args: --ok + spectral-args: scan --ok macos-audit: name: Spectral macos audit runs-on: ubuntu-latest @@ -56,7 +56,7 @@ jobs: uses: ./ with: spectral-dsn: ${{ secrets.SPECTRAL_DSN }} - spectral-args: --ok + spectral-args: scan --ok windows-audit: name: Spectral windows audit runs-on: windows-latest diff --git a/index.js b/index.js index f9fe457..44dc28a 100644 --- a/index.js +++ b/index.js @@ -54,5 +54,5 @@ async function runSpectral() { function getScanCommand() { const spectralArgs = core.getInput('spectral-args') - return `${process.platform === 'win32' ? 'spectral.exe scan' : 'spectral scan'} ${spectralArgs}` + return `${process.platform === 'win32' ? 'spectral.exe' : 'spectral'} ${spectralArgs}` } \ No newline at end of file From 0c178157f4d800217ebba65a6eac0a61b4a03709 Mon Sep 17 00:00:00 2001 From: guylev008 Date: Fri, 13 May 2022 18:13:41 +0300 Subject: [PATCH 08/10] wip --- package-lock.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index ccc2222..b62de92 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,5 +1,5 @@ { - "name": "actionsPOC", + "name": "spectral-github-action", "version": "1.0.0", "lockfileVersion": 1, "requires": true, diff --git a/package.json b/package.json index 1ecf75d..1604b91 100644 --- a/package.json +++ b/package.json @@ -20,4 +20,4 @@ "@actions/io": "^1.1.1", "@actions/tool-cache": "^1.7.1" } -} \ No newline at end of file +} From e8179b0f2d2c495c7fd26d8cbb2e9b858ecb978c Mon Sep 17 00:00:00 2001 From: guylev008 Date: Mon, 16 May 2022 11:04:27 +0300 Subject: [PATCH 09/10] fix action --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 75b7312..520689e 100644 --- a/action.yml +++ b/action.yml @@ -6,7 +6,7 @@ inputs: required: true spectral-args: description: "Arguments for Spectral scan" - required: false + required: true branding: icon: "download" color: "purple" From adcc0f5cc10ec53f874a47b65cea24944051ad3b Mon Sep 17 00:00:00 2001 From: guylev008 Date: Tue, 17 May 2022 10:56:24 +0300 Subject: [PATCH 10/10] update workflow --- .github/workflows/main.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ca34854..ba4a89c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -13,7 +13,7 @@ jobs: steps: - uses: actions/checkout@v2 - name: Install and run Spectral CI - uses: ./ + uses: spectralops/spectral-github-action@v2 with: spectral-dsn: ${{ secrets.SPECTRAL_DSN }} spectral-args: scan --ok @@ -23,7 +23,7 @@ jobs: steps: - uses: actions/checkout@v2 - name: Install and run Spectral Audit - uses: ./ + uses: spectralops/spectral-github-action@v2 with: spectral-dsn: ${{ secrets.SPECTRAL_DSN }} spectral-args: github -k repo -t ${{ secrets.MY_GITHUB_TOKEN }} https://github.com/SpectralOps/spectral-github-action --include-tags base,audit --ok @@ -33,7 +33,7 @@ jobs: steps: - uses: actions/checkout@v2 - name: Install and run Spectral CI - uses: ./ + uses: spectralops/spectral-github-action@v2 with: spectral-dsn: ${{ secrets.SPECTRAL_DSN }} spectral-args: scan --ok @@ -43,7 +43,7 @@ jobs: steps: - uses: actions/checkout@v2 - name: Install and run Spectral Audit - uses: ./ + uses: spectralops/spectral-github-action@v2 with: spectral-dsn: ${{ secrets.SPECTRAL_DSN }} spectral-args: github -k repo -t ${{ secrets.MY_GITHUB_TOKEN }} https://github.com/SpectralOps/spectral-github-action --include-tags base,audit --ok @@ -53,7 +53,7 @@ jobs: steps: - uses: actions/checkout@v2 - name: Install and run Spectral CI - uses: ./ + uses: spectralops/spectral-github-action@v2 with: spectral-dsn: ${{ secrets.SPECTRAL_DSN }} spectral-args: scan --ok @@ -63,7 +63,7 @@ jobs: steps: - uses: actions/checkout@v2 - name: Install and run Spectral Audit - uses: ./ + uses: spectralops/spectral-github-action@v2 with: spectral-dsn: ${{ secrets.SPECTRAL_DSN }} spectral-args: github -k repo -t ${{ secrets.MY_GITHUB_TOKEN }} https://github.com/SpectralOps/spectral-github-action --include-tags base,audit --ok