-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Throw error if run() is not exported (#109)
Whenever `local-action` is called, the entrypoint input must point to a file that exports a `run` function. Otherwise, a not-very-useful error occurs. This PR outputs a more useful error message when this scenario occurs in the future. See #104
- Loading branch information
Showing
17 changed files
with
133 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
ACTIONS_STEP_DEBUG=false | ||
INPUT_MILLISECONDS=2400 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
name: JavaScript (No Import) | ||
description: This action doesn't import any dependencies | ||
|
||
inputs: | ||
myInput: | ||
description: An input | ||
required: true | ||
default: value | ||
|
||
outputs: | ||
myOutput: | ||
description: An output | ||
|
||
runs: | ||
using: node20 | ||
main: dist/index.js |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"name": "javascript-action", | ||
"description": "GitHub Actions JavaScript template", | ||
"version": "0.0.0", | ||
"engines": { | ||
"node": ">=20" | ||
}, | ||
"dependencies": { | ||
"@actions/core": "^1.10.1" | ||
}, | ||
"devDependencies": {} | ||
} |
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
ACTIONS_STEP_DEBUG=false | ||
INPUT_MILLISECONDS=2400 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
name: The name of your action here | ||
description: Provide a description here | ||
author: Your name or organization here | ||
|
||
inputs: | ||
milliseconds: | ||
description: Your input description here | ||
required: true | ||
default: '1000' | ||
|
||
outputs: | ||
time: | ||
description: Your output description here | ||
|
||
runs: | ||
using: node20 | ||
main: dist/index.js |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"name": "typescript-action", | ||
"description": "GitHub Actions TypeScript template", | ||
"version": "0.0.0", | ||
"type": "module", | ||
"engines": { | ||
"node": ">=20" | ||
}, | ||
"dependencies": { | ||
"@actions/core": "^1.10.1" | ||
}, | ||
"devDependencies": { | ||
"@types/node": "^20.14.7", | ||
"ts-node": "^10.9.2", | ||
"typescript": "^5.5.2" | ||
} | ||
} |
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ | ||
"$schema": "https://json.schemastore.org/tsconfig", | ||
"compilerOptions": { | ||
"allowSyntheticDefaultImports": true, | ||
"declaration": true, | ||
"declarationMap": false, | ||
"esModuleInterop": true, | ||
"forceConsistentCasingInFileNames": true, | ||
"lib": ["ES2022"], | ||
"module": "NodeNext", | ||
"moduleResolution": "NodeNext", | ||
"newLine": "lf", | ||
"noImplicitAny": true, | ||
"noUnusedLocals": true, | ||
"noUnusedParameters": false, | ||
"pretty": true, | ||
"resolveJsonModule": true, | ||
"sourceMap": true, | ||
"strict": true, | ||
"strictNullChecks": true, | ||
"target": "ES2022" | ||
}, | ||
"exclude": ["node_modules"], | ||
"include": ["src"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters