You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/actions/creating-actions/creating-a-javascript-action.md
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -48,21 +48,21 @@ Before you begin, you'll need to download Node.js and create a public {% data va
48
48
49
49
1. From your terminal, change directories into your new repository.
50
50
51
-
```shell
51
+
```shell{:copy}
52
52
cd hello-world-javascript-action
53
53
```
54
54
55
55
1. From your terminal, initialize the directory with npm to generate a `package.json` file.
56
56
57
-
```shell
57
+
```shell{:copy}
58
58
npm init -y
59
59
```
60
60
61
61
## Creating an action metadata file
62
62
63
63
Create a new file named `action.yml` in the `hello-world-javascript-action` directory with the following example code. For more information, see "[Metadata syntax for {% data variables.product.prodname_actions %}](/actions/creating-actions/metadata-syntax-for-github-actions)."
64
64
65
-
```yaml
65
+
```yaml{:copy}
66
66
name: 'Hello World'
67
67
description: 'Greet someone and record the time'
68
68
inputs:
@@ -92,7 +92,7 @@ The toolkit offers more than the `core` and `github` packages. For more informat
92
92
93
93
At your terminal, install the actions toolkit `core` and `github` packages.
94
94
95
-
```shell
95
+
```shell{:copy}
96
96
npm install @actions/core
97
97
npm install @actions/github
98
98
```
@@ -108,7 +108,7 @@ GitHub Actions provide context information about the webhook event, Git refs, wo
108
108
Add a new file called `index.js`, with the following code.
109
109
110
110
{% raw %}
111
-
```javascript
111
+
```javascript{:copy}
112
112
const core = require('@actions/core');
113
113
const github = require('@actions/github');
114
114
@@ -174,7 +174,7 @@ From your terminal, commit your `action.yml`, `index.js`, `node_modules`, `packa
174
174
175
175
It's best practice to also add a version tag for releases of your action. For more information on versioning your action, see "[About actions](/actions/automating-your-workflow-with-github-actions/about-actions#using-release-management-for-actions)."
@@ -219,7 +219,7 @@ This example demonstrates how your new public action can be run from within an e
219
219
Copy the following YAML into a new file at `.github/workflows/main.yml`, and update the `uses: octocat/hello-world-javascript-action@v1.1` line with your username and the name of the public repository you created above. You can also replace the `who-to-greet` input with your name.
220
220
221
221
{% raw %}
222
-
```yaml
222
+
```yaml{:copy}
223
223
on: [push]
224
224
225
225
jobs:
@@ -246,7 +246,7 @@ Copy the workflow code into a `.github/workflows/main.yml` file in your action's
Copy file name to clipboardExpand all lines: lib/rest/static/decorated/ghes-3.0.json
+8-8Lines changed: 8 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -36177,14 +36177,14 @@
36177
36177
},
36178
36178
"contexts": {
36179
36179
"type": "array of strings",
36180
-
"description": "<p><strong>Required</strong>. The list of status checks to require in order to merge into this branch</p>",
36180
+
"description": "<p><strong>Required</strong>. The list of status checks to require in order to merge into this branch. If any of these checks have recently been set by a particular GitHub App, they will be required to come from that app in future for the branch to merge. Use <code>checks</code> instead of <code>contexts</code> for more fine-grained control.</p>",
36181
36181
"items": {
36182
36182
"type": "string"
36183
36183
},
36184
36184
"name": "contexts",
36185
36185
"in": "body",
36186
36186
"rawType": "array",
36187
-
"rawDescription": "The list of status checks to require in order to merge into this branch",
36187
+
"rawDescription": "The list of status checks to require in order to merge into this branch. If any of these checks have recently been set by a particular GitHub App, they will be required to come from that app in future for the branch to merge. Use `checks` instead of `contexts` for more fine-grained control.",
36188
36188
"childParamsGroups": []
36189
36189
}
36190
36190
},
@@ -36213,14 +36213,14 @@
36213
36213
},
36214
36214
{
36215
36215
"type": "array of strings",
36216
-
"description": "<p><strong>Required</strong>. The list of status checks to require in order to merge into this branch</p>",
36216
+
"description": "<p><strong>Required</strong>. The list of status checks to require in order to merge into this branch. If any of these checks have recently been set by a particular GitHub App, they will be required to come from that app in future for the branch to merge. Use <code>checks</code> instead of <code>contexts</code> for more fine-grained control.</p>",
36217
36217
"items": {
36218
36218
"type": "string"
36219
36219
},
36220
36220
"name": "contexts",
36221
36221
"in": "body",
36222
36222
"rawType": "array",
36223
-
"rawDescription": "The list of status checks to require in order to merge into this branch",
36223
+
"rawDescription": "The list of status checks to require in order to merge into this branch. If any of these checks have recently been set by a particular GitHub App, they will be required to come from that app in future for the branch to merge. Use `checks` instead of `contexts` for more fine-grained control.",
36224
36224
"childParamsGroups": []
36225
36225
}
36226
36226
]
@@ -36718,14 +36718,14 @@
36718
36718
},
36719
36719
"contexts": {
36720
36720
"type": "array of strings",
36721
-
"description": "<p><strong>Required</strong>. The list of status checks to require in order to merge into this branch</p>",
36721
+
"description": "<p><strong>Required</strong>. The list of status checks to require in order to merge into this branch. If any of these checks have recently been set by a particular GitHub App, they will be required to come from that app in future for the branch to merge. Use <code>checks</code> instead of <code>contexts</code> for more fine-grained control.</p>",
36722
36722
"items": {
36723
36723
"type": "string"
36724
36724
},
36725
36725
"name": "contexts",
36726
36726
"in": "body",
36727
36727
"rawType": "array",
36728
-
"rawDescription": "The list of status checks to require in order to merge into this branch",
36728
+
"rawDescription": "The list of status checks to require in order to merge into this branch. If any of these checks have recently been set by a particular GitHub App, they will be required to come from that app in future for the branch to merge. Use `checks` instead of `contexts` for more fine-grained control.",
36729
36729
"childParamsGroups": []
36730
36730
}
36731
36731
},
@@ -36754,14 +36754,14 @@
36754
36754
},
36755
36755
{
36756
36756
"type": "array of strings",
36757
-
"description": "<p><strong>Required</strong>. The list of status checks to require in order to merge into this branch</p>",
36757
+
"description": "<p><strong>Required</strong>. The list of status checks to require in order to merge into this branch. If any of these checks have recently been set by a particular GitHub App, they will be required to come from that app in future for the branch to merge. Use <code>checks</code> instead of <code>contexts</code> for more fine-grained control.</p>",
36758
36758
"items": {
36759
36759
"type": "string"
36760
36760
},
36761
36761
"name": "contexts",
36762
36762
"in": "body",
36763
36763
"rawType": "array",
36764
-
"rawDescription": "The list of status checks to require in order to merge into this branch",
36764
+
"rawDescription": "The list of status checks to require in order to merge into this branch. If any of these checks have recently been set by a particular GitHub App, they will be required to come from that app in future for the branch to merge. Use `checks` instead of `contexts` for more fine-grained control.",
Copy file name to clipboardExpand all lines: lib/rest/static/decorated/ghes-3.1.json
+8-8Lines changed: 8 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -36299,14 +36299,14 @@
36299
36299
},
36300
36300
"contexts": {
36301
36301
"type": "array of strings",
36302
-
"description": "<p><strong>Required</strong>. The list of status checks to require in order to merge into this branch</p>",
36302
+
"description": "<p><strong>Required</strong>. The list of status checks to require in order to merge into this branch. If any of these checks have recently been set by a particular GitHub App, they will be required to come from that app in future for the branch to merge. Use <code>checks</code> instead of <code>contexts</code> for more fine-grained control.</p>",
36303
36303
"items": {
36304
36304
"type": "string"
36305
36305
},
36306
36306
"name": "contexts",
36307
36307
"in": "body",
36308
36308
"rawType": "array",
36309
-
"rawDescription": "The list of status checks to require in order to merge into this branch",
36309
+
"rawDescription": "The list of status checks to require in order to merge into this branch. If any of these checks have recently been set by a particular GitHub App, they will be required to come from that app in future for the branch to merge. Use `checks` instead of `contexts` for more fine-grained control.",
36310
36310
"childParamsGroups": []
36311
36311
}
36312
36312
},
@@ -36335,14 +36335,14 @@
36335
36335
},
36336
36336
{
36337
36337
"type": "array of strings",
36338
-
"description": "<p><strong>Required</strong>. The list of status checks to require in order to merge into this branch</p>",
36338
+
"description": "<p><strong>Required</strong>. The list of status checks to require in order to merge into this branch. If any of these checks have recently been set by a particular GitHub App, they will be required to come from that app in future for the branch to merge. Use <code>checks</code> instead of <code>contexts</code> for more fine-grained control.</p>",
36339
36339
"items": {
36340
36340
"type": "string"
36341
36341
},
36342
36342
"name": "contexts",
36343
36343
"in": "body",
36344
36344
"rawType": "array",
36345
-
"rawDescription": "The list of status checks to require in order to merge into this branch",
36345
+
"rawDescription": "The list of status checks to require in order to merge into this branch. If any of these checks have recently been set by a particular GitHub App, they will be required to come from that app in future for the branch to merge. Use `checks` instead of `contexts` for more fine-grained control.",
36346
36346
"childParamsGroups": []
36347
36347
}
36348
36348
]
@@ -36840,14 +36840,14 @@
36840
36840
},
36841
36841
"contexts": {
36842
36842
"type": "array of strings",
36843
-
"description": "<p><strong>Required</strong>. The list of status checks to require in order to merge into this branch</p>",
36843
+
"description": "<p><strong>Required</strong>. The list of status checks to require in order to merge into this branch. If any of these checks have recently been set by a particular GitHub App, they will be required to come from that app in future for the branch to merge. Use <code>checks</code> instead of <code>contexts</code> for more fine-grained control.</p>",
36844
36844
"items": {
36845
36845
"type": "string"
36846
36846
},
36847
36847
"name": "contexts",
36848
36848
"in": "body",
36849
36849
"rawType": "array",
36850
-
"rawDescription": "The list of status checks to require in order to merge into this branch",
36850
+
"rawDescription": "The list of status checks to require in order to merge into this branch. If any of these checks have recently been set by a particular GitHub App, they will be required to come from that app in future for the branch to merge. Use `checks` instead of `contexts` for more fine-grained control.",
36851
36851
"childParamsGroups": []
36852
36852
}
36853
36853
},
@@ -36876,14 +36876,14 @@
36876
36876
},
36877
36877
{
36878
36878
"type": "array of strings",
36879
-
"description": "<p><strong>Required</strong>. The list of status checks to require in order to merge into this branch</p>",
36879
+
"description": "<p><strong>Required</strong>. The list of status checks to require in order to merge into this branch. If any of these checks have recently been set by a particular GitHub App, they will be required to come from that app in future for the branch to merge. Use <code>checks</code> instead of <code>contexts</code> for more fine-grained control.</p>",
36880
36880
"items": {
36881
36881
"type": "string"
36882
36882
},
36883
36883
"name": "contexts",
36884
36884
"in": "body",
36885
36885
"rawType": "array",
36886
-
"rawDescription": "The list of status checks to require in order to merge into this branch",
36886
+
"rawDescription": "The list of status checks to require in order to merge into this branch. If any of these checks have recently been set by a particular GitHub App, they will be required to come from that app in future for the branch to merge. Use `checks` instead of `contexts` for more fine-grained control.",
Copy file name to clipboardExpand all lines: lib/rest/static/decorated/ghes-3.2.json
+8-8Lines changed: 8 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -37545,14 +37545,14 @@
37545
37545
},
37546
37546
"contexts": {
37547
37547
"type": "array of strings",
37548
-
"description": "<p><strong>Required</strong>. The list of status checks to require in order to merge into this branch</p>",
37548
+
"description": "<p><strong>Required</strong>. The list of status checks to require in order to merge into this branch. If any of these checks have recently been set by a particular GitHub App, they will be required to come from that app in future for the branch to merge. Use <code>checks</code> instead of <code>contexts</code> for more fine-grained control.</p>",
37549
37549
"items": {
37550
37550
"type": "string"
37551
37551
},
37552
37552
"name": "contexts",
37553
37553
"in": "body",
37554
37554
"rawType": "array",
37555
-
"rawDescription": "The list of status checks to require in order to merge into this branch",
37555
+
"rawDescription": "The list of status checks to require in order to merge into this branch. If any of these checks have recently been set by a particular GitHub App, they will be required to come from that app in future for the branch to merge. Use `checks` instead of `contexts` for more fine-grained control.",
37556
37556
"childParamsGroups": []
37557
37557
}
37558
37558
},
@@ -37581,14 +37581,14 @@
37581
37581
},
37582
37582
{
37583
37583
"type": "array of strings",
37584
-
"description": "<p><strong>Required</strong>. The list of status checks to require in order to merge into this branch</p>",
37584
+
"description": "<p><strong>Required</strong>. The list of status checks to require in order to merge into this branch. If any of these checks have recently been set by a particular GitHub App, they will be required to come from that app in future for the branch to merge. Use <code>checks</code> instead of <code>contexts</code> for more fine-grained control.</p>",
37585
37585
"items": {
37586
37586
"type": "string"
37587
37587
},
37588
37588
"name": "contexts",
37589
37589
"in": "body",
37590
37590
"rawType": "array",
37591
-
"rawDescription": "The list of status checks to require in order to merge into this branch",
37591
+
"rawDescription": "The list of status checks to require in order to merge into this branch. If any of these checks have recently been set by a particular GitHub App, they will be required to come from that app in future for the branch to merge. Use `checks` instead of `contexts` for more fine-grained control.",
37592
37592
"childParamsGroups": []
37593
37593
}
37594
37594
]
@@ -38086,14 +38086,14 @@
38086
38086
},
38087
38087
"contexts": {
38088
38088
"type": "array of strings",
38089
-
"description": "<p><strong>Required</strong>. The list of status checks to require in order to merge into this branch</p>",
38089
+
"description": "<p><strong>Required</strong>. The list of status checks to require in order to merge into this branch. If any of these checks have recently been set by a particular GitHub App, they will be required to come from that app in future for the branch to merge. Use <code>checks</code> instead of <code>contexts</code> for more fine-grained control.</p>",
38090
38090
"items": {
38091
38091
"type": "string"
38092
38092
},
38093
38093
"name": "contexts",
38094
38094
"in": "body",
38095
38095
"rawType": "array",
38096
-
"rawDescription": "The list of status checks to require in order to merge into this branch",
38096
+
"rawDescription": "The list of status checks to require in order to merge into this branch. If any of these checks have recently been set by a particular GitHub App, they will be required to come from that app in future for the branch to merge. Use `checks` instead of `contexts` for more fine-grained control.",
38097
38097
"childParamsGroups": []
38098
38098
}
38099
38099
},
@@ -38122,14 +38122,14 @@
38122
38122
},
38123
38123
{
38124
38124
"type": "array of strings",
38125
-
"description": "<p><strong>Required</strong>. The list of status checks to require in order to merge into this branch</p>",
38125
+
"description": "<p><strong>Required</strong>. The list of status checks to require in order to merge into this branch. If any of these checks have recently been set by a particular GitHub App, they will be required to come from that app in future for the branch to merge. Use <code>checks</code> instead of <code>contexts</code> for more fine-grained control.</p>",
38126
38126
"items": {
38127
38127
"type": "string"
38128
38128
},
38129
38129
"name": "contexts",
38130
38130
"in": "body",
38131
38131
"rawType": "array",
38132
-
"rawDescription": "The list of status checks to require in order to merge into this branch",
38132
+
"rawDescription": "The list of status checks to require in order to merge into this branch. If any of these checks have recently been set by a particular GitHub App, they will be required to come from that app in future for the branch to merge. Use `checks` instead of `contexts` for more fine-grained control.",
0 commit comments