Skip to content

Commit 641ed02

Browse files
vanessayuennemilyistoofunkyCynthia Rich
authored
Actions Guides sublanding page (#16740)
Co-authored-by: Emily Gould <4822039+emilyistoofunky@users.noreply.github.com> Co-authored-by: Cynthia Rich <crichID@github.com>
1 parent 8c881e6 commit 641ed02

64 files changed

Lines changed: 542 additions & 196 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

content/actions/creating-actions/about-actions.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ redirect_from:
1010
versions:
1111
free-pro-team: '*'
1212
enterprise-server: '>=2.22'
13+
type: 'overview'
1314
---
1415

1516
{% data reusables.actions.enterprise-beta %}

content/actions/creating-actions/creating-a-composite-run-steps-action.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ product: '{% data reusables.gated-features.actions %}'
55
versions:
66
free-pro-team: '*'
77
enterprise-server: '>=2.22'
8+
type: 'tutorial'
89
---
910

1011
{% data reusables.actions.enterprise-beta %}

content/actions/creating-actions/creating-a-docker-container-action.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ redirect_from:
1010
versions:
1111
free-pro-team: '*'
1212
enterprise-server: '>=2.22'
13+
type: 'tutorial'
1314
---
1415

1516
{% data reusables.actions.enterprise-beta %}

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ redirect_from:
1010
versions:
1111
free-pro-team: '*'
1212
enterprise-server: '>=2.22'
13+
type: 'tutorial'
1314
---
1415

1516
{% data reusables.actions.enterprise-beta %}

content/actions/creating-actions/dockerfile-support-for-github-actions.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ redirect_from:
88
versions:
99
free-pro-team: '*'
1010
enterprise-server: '>=2.22'
11+
type: 'reference'
1112
---
1213

1314
{% data reusables.actions.enterprise-beta %}
@@ -52,40 +53,40 @@ ENTRYPOINT ["echo $GITHUB_SHA"]
5253
```
5354

5455
If you want variable substitution, then either use the _shell_ form or execute a shell directly. For example, using the following _exec_ format, you can execute a shell to print the value stored in the `GITHUB_SHA` environment variable.
55-
56+
5657
```
5758
ENTRYPOINT ["sh", "-c", "echo $GITHUB_SHA"]
5859
````
5960
6061
To supply `args` defined in the action's metadata file to a Docker container that uses the _exec_ form in the `ENTRYPOINT`, we recommend creating a shell script called `entrypoint.sh` that you call from the `ENTRYPOINT` instruction:
6162
6263
##### Example *Dockerfile*
63-
```
64+
```
6465
# Container image that runs your code
6566
FROM debian:9.5-slim
6667

6768
# Copies your code file from your action repository to the filesystem path `/` of the container
6869
COPY entrypoint.sh /entrypoint.sh
6970

70-
# Executes `entrypoint.sh` when the Docker container starts up
71+
# Executes `entrypoint.sh` when the Docker container starts up
7172
ENTRYPOINT ["/entrypoint.sh"]
7273
```
7374
7475
##### Example *entrypoint.sh* file
7576
76-
Using the example Dockerfile above, {% data variables.product.product_name %} will send the `args` configured in the action's metadata file as arguments to `entrypoint.sh`. Add the `#!/bin/sh` [shebang](https://en.wikipedia.org/wiki/Shebang_(Unix)) at the top of the `entrypoint.sh` file to explicitly use the system's [POSIX](https://en.wikipedia.org/wiki/POSIX)-compliant shell.
77+
Using the example Dockerfile above, {% data variables.product.product_name %} will send the `args` configured in the action's metadata file as arguments to `entrypoint.sh`. Add the `#!/bin/sh` [shebang](https://en.wikipedia.org/wiki/Shebang_(Unix)) at the top of the `entrypoint.sh` file to explicitly use the system's [POSIX](https://en.wikipedia.org/wiki/POSIX)-compliant shell.
7778
7879
``` sh
7980
#!/bin/sh
8081
81-
# `$*` expands the `args` supplied in an `array` individually
82+
# `$*` expands the `args` supplied in an `array` individually
8283
# or splits `args` in a string separated by whitespace.
8384
sh -c "echo $*"
8485
```
8586

86-
Your code must be executable. Make sure the `entrypoint.sh` file has `execute` permissions before using it in a workflow. You can modify the permission from your terminal using this command:
87+
Your code must be executable. Make sure the `entrypoint.sh` file has `execute` permissions before using it in a workflow. You can modify the permission from your terminal using this command:
8788
``` sh
88-
chmod +x entrypoint.sh
89+
chmod +x entrypoint.sh
8990
```
9091

9192
When an `ENTRYPOINT` shell script is not executable, you'll receive an error similar to this:

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

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ redirect_from:
1111
versions:
1212
free-pro-team: '*'
1313
enterprise-server: '>=2.22'
14+
type: 'reference'
1415
---
1516

1617
{% data reusables.actions.enterprise-beta %}
@@ -104,12 +105,12 @@ outputs:
104105
{% raw %}
105106
```yaml
106107
outputs:
107-
random-number:
108+
random-number:
108109
description: "Random number"
109110
value: ${{ steps.random-number-generator.outputs.random-id }}
110111
runs:
111112
using: "composite"
112-
steps:
113+
steps:
113114
- id: random-number-generator
114115
run: echo "::set-output name=random-id::$(echo $RANDOM)"
115116
shell: bash
@@ -159,7 +160,7 @@ runs:
159160
#### `pre-if`
160161

161162
**Optional** Allows you to define conditions for the `pre:` action execution. The `pre:` action will only run if the conditions in `pre-if` are met. If not set, then `pre-if` defaults to `always()`.
162-
Note that the `step` context is unavailable, as no steps have run yet.
163+
Note that the `step` context is unavailable, as no steps have run yet.
163164

164165
In this example, `cleanup.js` only runs on Linux-based runners:
165166

@@ -214,7 +215,7 @@ For example, this `cleanup.js` will only run on Linux-based runners:
214215
```yaml
215216
runs:
216217
using: "composite"
217-
steps:
218+
steps:
218219
- run: ${{ github.action_path }}/test/script.sh
219220
shell: bash
220221
```
@@ -225,7 +226,7 @@ Alternatively, you can use `$GITHUB_ACTION_PATH`:
225226
```yaml
226227
runs:
227228
using: "composite"
228-
steps:
229+
steps:
229230
- run: $GITHUB_ACTION_PATH/script.sh
230231
shell: bash
231232
```
@@ -254,20 +255,20 @@ For more information, see "[`github context`](/actions/reference/context-and-exp
254255

255256
### `runs` for Docker actions
256257

257-
**Required** Configures the image used for the Docker action.
258+
**Required** Configures the image used for the Docker action.
258259

259260
#### Example using a Dockerfile in your repository
260261

261262
```yaml
262-
runs:
263+
runs:
263264
using: 'docker'
264265
image: 'Dockerfile'
265266
```
266267

267268
#### Example using public Docker registry container
268269

269270
```yaml
270-
runs:
271+
runs:
271272
using: 'docker'
272273
image: 'docker://debian:stretch-slim'
273274
```

content/actions/creating-actions/publishing-actions-in-github-marketplace.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ redirect_from:
88
- /actions/building-actions/publishing-actions-in-github-marketplace
99
versions:
1010
free-pro-team: '*'
11+
type: 'how_to'
1112
---
1213

1314
You must accept the terms of service to publish actions in {% data variables.product.prodname_marketplace %}.

content/actions/creating-actions/setting-exit-codes-for-actions.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ redirect_from:
88
versions:
99
free-pro-team: '*'
1010
enterprise-server: '>=2.22'
11+
type: 'how_to'
1112
---
1213

1314
{% data reusables.actions.enterprise-beta %}

content/actions/guides/about-continuous-integration.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ redirect_from:
1010
versions:
1111
free-pro-team: '*'
1212
enterprise-server: '>=2.22'
13+
type: 'overview'
1314
---
1415

1516
{% data reusables.actions.enterprise-beta %}

content/actions/guides/about-packaging-with-github-actions.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ redirect_from:
88
versions:
99
free-pro-team: '*'
1010
enterprise-server: '>=2.22'
11+
type: 'overview'
1112
---
1213

1314
{% data reusables.actions.enterprise-beta %}

0 commit comments

Comments
 (0)