|
8 | 8 |
|
9 | 9 | // Copyright (c) JFrog Ltd. (2025) |
10 | 10 | Object.defineProperty(exports, "__esModule", ({ value: true })); |
11 | | -exports.GITHUB_STATUS_SKIPPED = exports.GITHUB_STATUS_TIMED_OUT = exports.GITHUB_STATUS_CANCELLED = exports.GITHUB_STATUS_FAILURE = exports.GITHUB_STATUS_SUCCESS = exports.FLY_CLI_SETUP_OUTPUT_PATH = exports.FLY_CLI_PATH = exports.STATE_FLY_PACKAGE_MANAGERS = exports.STATE_FLY_ACCESS_TOKEN = exports.STATE_FLY_URL = exports.INPUT_IGNORE_PACKAGE_MANAGERS = exports.INPUT_URL = void 0; |
| 11 | +exports.GITHUB_STATUS_SKIPPED = exports.GITHUB_STATUS_TIMED_OUT = exports.GITHUB_STATUS_CANCELLED = exports.GITHUB_STATUS_FAILURE = exports.GITHUB_STATUS_SUCCESS = exports.FLY_CLI_SETUP_OUTPUT_PATH = exports.FLY_CLI_PATH = exports.STATE_FLY_PACKAGE_MANAGERS = exports.STATE_FLY_ACCESS_TOKEN = exports.STATE_FLY_URL = exports.INPUT_GITHUB_TOKEN = exports.INPUT_IGNORE_PACKAGE_MANAGERS = exports.INPUT_URL = void 0; |
12 | 12 | exports.INPUT_URL = "url"; |
13 | 13 | exports.INPUT_IGNORE_PACKAGE_MANAGERS = "ignore"; |
| 14 | +exports.INPUT_GITHUB_TOKEN = "github_token"; |
14 | 15 | exports.STATE_FLY_URL = "fly-url"; |
15 | 16 | exports.STATE_FLY_ACCESS_TOKEN = "fly-access-token"; |
16 | 17 | exports.STATE_FLY_PACKAGE_MANAGERS = "fly-package-managers"; |
@@ -70,7 +71,7 @@ exports.createJobSummary = createJobSummary; |
70 | 71 | const core = __importStar(__nccwpck_require__(7484)); |
71 | 72 | const fs = __importStar(__nccwpck_require__(9896)); |
72 | 73 | const path = __importStar(__nccwpck_require__(6928)); |
73 | | -async function createJobSummary(packageManagers) { |
| 74 | +async function createJobSummary() { |
74 | 75 | try { |
75 | 76 | // Build release URL |
76 | 77 | const fullRepo = process.env.GITHUB_REPOSITORY; |
@@ -159,18 +160,18 @@ const job_summary_1 = __nccwpck_require__(5175); |
159 | 160 | function getGitHubEnvironment() { |
160 | 161 | const runId = process.env.GITHUB_RUN_ID; |
161 | 162 | const repository = process.env.GITHUB_REPOSITORY; |
162 | | - const token = core.getInput("token") || process.env.GITHUB_TOKEN; |
| 163 | + const githubToken = core.getInput(constants_1.INPUT_GITHUB_TOKEN) || process.env.GITHUB_TOKEN; |
163 | 164 | const jobName = process.env.GITHUB_JOB; |
164 | 165 | core.info(`🔍 Checking job status for run ${runId} in repo ${repository}`); |
165 | 166 | core.info(`📋 Current job: ${jobName}`); |
166 | | - if (!runId || !repository || !token) { |
| 167 | + if (!runId || !repository || !githubToken) { |
167 | 168 | core.warning("Missing GitHub environment variables, assuming job succeeded since post action is running"); |
168 | 169 | return null; |
169 | 170 | } |
170 | 171 | return { |
171 | 172 | runId: runId, |
172 | 173 | repository: repository, |
173 | | - token: token, |
| 174 | + token: githubToken, |
174 | 175 | jobName: jobName, |
175 | 176 | }; |
176 | 177 | } |
@@ -306,7 +307,7 @@ async function runPost() { |
306 | 307 | // Only create job summary if the job succeeded |
307 | 308 | if (determinedStatus === constants_1.GITHUB_STATUS_SUCCESS) { |
308 | 309 | core.info("📋 Creating job summary for successful job..."); |
309 | | - await (0, job_summary_1.createJobSummary)(packageManagers); |
| 310 | + await (0, job_summary_1.createJobSummary)(); |
310 | 311 | } |
311 | 312 | else { |
312 | 313 | core.info("⚠️ Skipping job summary creation - job did not succeed"); |
|
0 commit comments