Skip to content

Commit 654beba

Browse files
vgrlguntrip
andauthored
[GHES 3.4 versioning] Fix for node16 (#23938)
Co-authored-by: Steve Guntrip <12534592+stevecat@users.noreply.github.com>
1 parent e88b588 commit 654beba

2 files changed

Lines changed: 9 additions & 9 deletions

File tree

content/actions/creating-actions/creating-a-javascript-action.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ Once you complete this project, you should understand how to build your own Java
3737

3838
Before you begin, you'll need to download Node.js and create a public {% data variables.product.prodname_dotcom %} repository.
3939

40-
1. Download and install Node.js 12.x, which includes npm.
40+
1. Download and install Node.js {% ifversion fpt or ghes > 3.3 or ghae-issue-5504 or ghec %}16.x{% else %}12.x{% endif %}, which includes npm.
4141

42-
https://nodejs.org/en/download/current/
42+
{% ifversion fpt or ghes > 3.3 or ghae-issue-5504 or ghec %}https://nodejs.org/en/download/{% else %}https://nodejs.org/en/download/releases/{% endif %}
4343

4444
1. Create a new public repository on {% data variables.product.product_location %} and call it "hello-world-javascript-action". For more information, see "[Create a new repository](/articles/creating-a-new-repository)."
4545

@@ -73,7 +73,7 @@ outputs:
7373
time: # id of output
7474
description: 'The time we greeted you'
7575
runs:
76-
using: 'node12'
76+
using: {% ifversion fpt or ghes > 3.3 or ghae-issue-5504 or ghec %}'node16'{% else %}'node12'{% endif %}
7777
main: 'index.js'
7878
```
7979

content/actions/creating-actions/metadata-syntax-for-github-actions.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -140,20 +140,20 @@ For more information on how to use context syntax, see "[Contexts](/actions/lear
140140

141141
**Required** Configures the path to the action's code and the runtime used to execute the code.
142142

143-
### Example using Node.js v12
143+
### Example using Node.js {% ifversion fpt or ghes > 3.3 or ghae-issue-5504 or ghec %}v16{% else %}v12{% endif %}
144144

145145
```yaml
146146
runs:
147-
using: 'node12'
147+
using: {% ifversion fpt or ghes > 3.3 or ghae-issue-5504 or ghec %}'node16'{% else %}'node12'{% endif %}
148148
main: 'main.js'
149149
```
150150

151151
### `runs.using`
152152

153153
**Required** The runtime used to execute the code specified in [`main`](#runsmain).
154154

155-
- Use `node12` for Node.js v12.
156-
- Use `node16` for Node.js v16.
155+
- Use `node12` for Node.js v12.{% ifversion fpt or ghes > 3.3 or ghae-issue-5504 or ghec %}
156+
- Use `node16` for Node.js v16.{% endif %}
157157

158158
### `runs.main`
159159

@@ -167,7 +167,7 @@ In this example, the `pre:` action runs a script called `setup.js`:
167167

168168
```yaml
169169
runs:
170-
using: 'node12'
170+
using: {% ifversion fpt or ghes > 3.3 or ghae-issue-5504 or ghec %}'node16'{% else %}'node12'{% endif %}
171171
pre: 'setup.js'
172172
main: 'index.js'
173173
post: 'cleanup.js'
@@ -194,7 +194,7 @@ In this example, the `post:` action runs a script called `cleanup.js`:
194194

195195
```yaml
196196
runs:
197-
using: 'node12'
197+
using: {% ifversion fpt or ghes > 3.3 or ghae-issue-5504 or ghec %}'node16'{% else %}'node12'{% endif %}
198198
main: 'index.js'
199199
post: 'cleanup.js'
200200
```

0 commit comments

Comments
 (0)