Skip to content

Commit 0af3281

Browse files
committed
Use gitHubVersion from config if available in init-action-post
1 parent 8dfe937 commit 0af3281

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

‎lib/entry-points.js‎

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎src/init-action-post.ts‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,9 @@ async function run(startedAt: Date) {
6464
// Restore inputs from `init` Action.
6565
restoreInputs(logger);
6666

67-
const gitHubVersion = await getGitHubVersion();
67+
config = await getConfig(getTemporaryDirectory(), logger);
68+
69+
const gitHubVersion = config?.gitHubVersion ?? (await getGitHubVersion());
6870
checkGitHubVersionInRange(gitHubVersion, logger);
6971

7072
const repositoryNwo = getRepositoryNwo();
@@ -75,7 +77,6 @@ async function run(startedAt: Date) {
7577
logger,
7678
);
7779

78-
config = await getConfig(getTemporaryDirectory(), logger);
7980
if (config === undefined) {
8081
logger.warning(
8182
"Debugging artifacts are unavailable since the 'init' Action failed before it could produce any.",

0 commit comments

Comments
 (0)