Skip to content

Commit 5990536

Browse files
committed
ceanup action
update reame switch default node version to 18
1 parent 56d35a7 commit 5990536

File tree

3 files changed

+48
-6
lines changed

3 files changed

+48
-6
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
ARG NODE_VERSION=16
1+
ARG NODE_VERSION=18
22

33
FROM node:${NODE_VERSION}-bullseye
44

README.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,50 @@
11
# Node runner
22

33
Simple image for executing node tasks inside a container.
4+
5+
The image will run `npm i --prefer-offline --no-audit` befor it run your script.
6+
7+
## Images:
8+
9+
| **Node version** | **image** |
10+
|-|-|
11+
| 14 | ghcr.io/scarbous/node-runner/14 |
12+
| 16 | ghcr.io/scarbous/node-runner/16 |
13+
| 18 | ghcr.io/scarbous/node-runner/18 |
14+
| 19 | ghcr.io/scarbous/node-runner/19 |
15+
16+
## Usage
17+
18+
Mount the your app to `/src`.
19+
By default the Image will run the script `dev` which is defined in the `package.json` in your project-root.
20+
21+
### Environment variables
22+
23+
| **Name** | **Info** |
24+
|-|-|
25+
| **DIR** | The dir which contains your `package.json` |
26+
| **TASK** | Name of the script to run |
27+
28+
29+
# GitHub docker action
30+
31+
The action runs the configured script from your `package.json`.
32+
33+
## Inputs
34+
35+
| **Name** | **Default** | **Info** |
36+
|-|-|-|
37+
| **DIR** | `"/"` | The dir which contains your `package.json` |
38+
| **TASK** | `"buil"` | Name of the script to run |
39+
40+
## Example usage
41+
42+
In this example the runner will execute the `build` script inside the Build dir.
43+
44+
```yaml
45+
steps:
46+
- uses: Scarbous/node-runner@1.0.6
47+
with:
48+
dir: Build
49+
task: build
50+
```

action.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@ branding:
44
color: orange
55
description: It will install and run your npm script
66
inputs:
7-
nodeVersion:
8-
description: the node Version to use
9-
default: "16"
107
dir:
118
description: base dir of
129
default: "/"
@@ -15,8 +12,6 @@ inputs:
1512
default: "build"
1613
runs:
1714
using: 'docker'
18-
args:
19-
- NODE_VERSION=${{ inputs.nodeVersion }}
2015
env:
2116
DIR: "/github/workspace/${{ inputs.dir }}"
2217
TASK: ${{ inputs.task }}

0 commit comments

Comments
 (0)