Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ inputs:
offline:
description: 'Skip all CodeCargo API communication (audit upload and policy fetch)'
default: 'false'
job-id:
description: 'The check run ID of the current job (populated from the workflow context by default; override if needed)'
default: ${{ job.check_run_id }}

outputs:
supported:
Expand Down
4 changes: 3 additions & 1 deletion dist/main/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion dist/post/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import * as path from 'path'

const INSTALL_DIR = '/usr/local/bin'
const BINARY_NAME = 'cargowall'
const CARGOWALL_VERSION = 'v1.0.0'
const CARGOWALL_VERSION = 'v1.0.1'

export async function setup(): Promise<boolean> {
const failOnUnsupported = core.getInput('fail-on-unsupported') === 'true'
Expand Down
2 changes: 2 additions & 0 deletions src/start.ts
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,8 @@ export async function start(): Promise<{ supported: boolean; pid: number | null
if (githubServiceHosts) core.info(` GitHub service hosts: ${githubServiceHosts}`)
if (azureInfraHosts) core.info(` Azure infra hosts: ${azureInfraHosts}`)
if (configFile) core.info(` Config file: ${configFile}`)
const jobId = core.getInput('job-id')
if (jobId) core.info(` Job run ID: ${jobId}`)
core.info(` Sudo lockdown: ${sudoLockdown}`)
core.info(` DNS upstream: ${dnsUpstream}`)

Expand Down
6 changes: 5 additions & 1 deletion src/summary.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,10 @@ export async function generateSummary(): Promise<void> {
summaryArgs.push('--api-url', apiUrl)
summaryArgs.push('--job-key', github.context.job)
summaryArgs.push('--job-name', currentJobName)
const jobId = core.getInput('job-id')
if (jobId) {
summaryArgs.push('--job-run-id', jobId)
}

// Prefer the effective mode written by the Go binary (which may have
// been overridden by the SaaS policy) over the static Action input.
Expand Down Expand Up @@ -156,7 +160,7 @@ export async function generateSummary(): Promise<void> {
`Failed to get OIDC token for API push. Ensure the workflow has "permissions: id-token: write". Error: ${error}`
)
// Remove API-related args so the binary doesn't attempt an unauthenticated push
for (const flag of ['--api-url', '--job-key', '--job-name', '--mode', '--default-action', '--job-status']) {
for (const flag of ['--api-url', '--job-key', '--job-name', '--job-run-id', '--mode', '--default-action', '--job-status']) {
const idx = summaryArgs.findIndex(a => a === flag)
if (idx !== -1) summaryArgs.splice(idx, 2) // remove flag and its value
}
Expand Down
Loading