From 664643a9d3c6f8c01b5e13d00a23a92e85b77c8f Mon Sep 17 00:00:00 2001 From: David Hiendl Date: Sat, 2 Dec 2023 18:42:01 +0100 Subject: [PATCH] fix ncc always outputing file as index.s --- action.yml | 6 +++--- src/collect_git.js | 5 +---- src/index.js | 6 ++++++ 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/action.yml b/action.yml index 12a211a..4558f25 100644 --- a/action.yml +++ b/action.yml @@ -29,7 +29,7 @@ outputs: ci_hostname: description: 'ci server hostname without http(s) prefix' - + semver_valid: description: "Flag indicating if the semver version parsed from a tag is valid" semver_major: @@ -45,8 +45,8 @@ outputs: runs: using: "node20" - main: ./dist/action.js + main: ./dist/index.js branding: icon: git-branch - color: white \ No newline at end of file + color: white diff --git a/src/collect_git.js b/src/collect_git.js index 53f072a..7fc7c42 100644 --- a/src/collect_git.js +++ b/src/collect_git.js @@ -22,12 +22,9 @@ export function collect_git(debug = false, output = false) { }; try { + // TODO actually strip tag prefix const stripTagPrefix = core.getInput('strip_tag_prefix'); - if (debug) { - console.log(JSON.stringify(github.context, null, 2)); - } - r.git_is_tag = github.context.ref.startsWith('refs/tags/'); r.git_default_branch = github.context.payload?.repository?.defaultBranch; r.git_is_pull_request = github.context.payload.pull_request != null; diff --git a/src/index.js b/src/index.js index c4d5d86..c27ec91 100644 --- a/src/index.js +++ b/src/index.js @@ -1,3 +1,4 @@ +import * as github from '@actions/github'; import {collect_ci} from './collect_ci'; import {collect_git} from './collect_git'; @@ -6,6 +7,11 @@ export {collect_git} from './collect_git'; export {collect_ci} from './collect_ci'; export function collect_all(debug = false, output = false) { + + if (debug) { + console.log(JSON.stringify(github.context, null, 2)); + } + collect_ci(debug, output); collect_git(debug, output); }