Skip to content

Commit c58c4e0

Browse files
author
Alvaro Muñoz
committed
feat(actions): refactor as composite action to be able to pass env vars
1 parent e2699c3 commit c58c4e0

File tree

4 files changed

+16
-6
lines changed

4 files changed

+16
-6
lines changed

.github/action/dist/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28678,12 +28678,12 @@ async function installPack(codeql, path) {
2867828678
try {
2867928679
await runCommand(codeql, ["pack", "install"], path);
2868028680
await runCommand(codeql, ["pack", "install"], path);
28681+
core.info("Installed local packs ...");
2868128682
return true;
2868228683
}
2868328684
catch (error) {
2868428685
core.warning("Failed to install local packs ...");
2868528686
}
28686-
core.info("Installed local packs ...");
2868728687
return false;
2868828688
}
2868928689
exports.installPack = installPack;
@@ -30815,4 +30815,4 @@ module.exports = parseParams
3081530815
/******/ module.exports = __webpack_exports__;
3081630816
/******/
3081730817
/******/ })()
30818-
;
30818+
;

.github/action/src/codeql.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,6 @@ export async function installPack(
116116
} catch (error) {
117117
core.warning("Failed to install local packs ...");
118118
}
119-
core.info("Installed local packs ...");
120119
return false;
121120
}
122121

.github/action/src/gh.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export interface GHConfig {
1212

1313
export async function newGHConfig(): Promise<GHConfig> {
1414
return {
15-
path: "",
15+
path: "/usr/bin/",
1616
};
1717
}
1818

action.yml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,17 @@ inputs:
1414
description: "SARIF File Output"
1515
default: "codeql-actions.sarif"
1616

17+
# runs:
18+
# using: "node16"
19+
# main: ".github/action/dist/index.js"
20+
1721
runs:
18-
using: "node16"
19-
main: ".github/action/dist/index.js"
22+
using: 'composite'
23+
steps:
24+
- name: Do something with context
25+
shell: bash
26+
env:
27+
GH_TOKEN: ${{ github.token }}
28+
run: |
29+
node .github/action/dist/index.js
30+
node ${{ github.action_path }}/.github/action/dist/index.js

0 commit comments

Comments
 (0)