-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0ff82de
commit fc6171d
Showing
7 changed files
with
90 additions
and
0 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 @@ | ||
* @StephenHodgson |
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,18 @@ | ||
name: validate | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
workflow_dispatch: # Enable triggering the workflow manually from the Actions tab | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
jobs: | ||
validate: | ||
runs-on: [ubuntu-latest, macos-latest, windows-latest] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- run: echo "hello world" |
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 @@ | ||
node_modules |
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 |
---|---|---|
@@ -1,2 +1,20 @@ | ||
# github-action-js-template | ||
|
||
A GitHub Actions template repository for JavaScript based Actions | ||
|
||
## How to use | ||
|
||
### workflow | ||
|
||
```yaml | ||
steps: | ||
- uses: RageAgainstThePixel/<github-action>@v1 | ||
``` | ||
### inputs | ||
| name | description | required | | ||
| ---- | ----------- | -------- | | ||
| .... | ........... | ........ | | ||
### outputs |
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,8 @@ | ||
name: <github-action> | ||
description: 'A GitHub Actions template repository for JavaScript based Actions' | ||
# inputs: | ||
# outputs: | ||
runs: | ||
using: 'node20' | ||
main: 'dist/index.js' | ||
#post: 'dist/index.js' |
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,27 @@ | ||
{ | ||
"name": "<github-action>", | ||
"version": "1.0.0", | ||
"description": "A GitHub Actions template repository for JavaScript based Actions", | ||
"author": "<author>", | ||
"license": "MIT", | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/<author>/<github-action>.git" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/<author>/<github-action>/issues" | ||
}, | ||
"homepage": "https://github.com/<author>/<github-action>", | ||
"main": "dist/index.js", | ||
"keywords": [], | ||
"dependencies": { | ||
"@actions/core": "^1.10.1" | ||
}, | ||
"devDependencies": { | ||
"@vercel/ncc": "^0.34.0" | ||
}, | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1", | ||
"build": "npm install && npm ci && ncc build src/index.js -o dist --source-map --license licenses.txt" | ||
} | ||
} |
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 @@ | ||
const core = require('@actions/core'); | ||
|
||
const IS_POST = !!core.getState('isPost'); | ||
|
||
const main = async () => { | ||
try { | ||
if (!IS_POST) { | ||
core.info('Hello World!'); | ||
} else { | ||
core.info('Hello World! (post)'); | ||
} | ||
} catch (error) { | ||
core.setFailed(error); | ||
} | ||
} | ||
|
||
main(); |