Skip to content

Commit 6f7e4f5

Browse files
committed
updating content files
1 parent 850ab9c commit 6f7e4f5

File tree

1,154 files changed

+6299
-6267
lines changed

Some content is hidden

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

1,154 files changed

+6299
-6267
lines changed

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

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ topics:
2121
{% data reusables.actions.enterprise-github-hosted-runners %}
2222
{% data reusables.actions.ae-beta %}
2323

24-
### About actions
24+
## About actions
2525

2626
You can create actions by writing custom code that interacts with your repository in any way you'd like, including integrating with {% data variables.product.prodname_dotcom %}'s APIs and any publicly available third-party API. For example, an action can publish npm modules, send SMS alerts when urgent issues are created, or deploy production-ready code.
2727

@@ -31,7 +31,7 @@ You can write your own actions to use in your workflow or share the actions you
3131

3232
Actions can run directly on a machine or in a Docker container. You can define an action's inputs, outputs, and environment variables.
3333

34-
### Types of actions
34+
## Types of actions
3535

3636
You can build Docker container and JavaScript actions. Actions require a metadata file to define the inputs, outputs and main entrypoint for your action. The metadata filename must be either `action.yml` or `action.yaml`. For more information, see "[Metadata syntax for {% data variables.product.prodname_actions %}](/articles/metadata-syntax-for-github-actions)."
3737

@@ -41,27 +41,27 @@ You can build Docker container and JavaScript actions. Actions require a metadat
4141
| JavaScript | Linux, macOS, Windows |
4242
| Composite run steps | Linux, macOS, Windows |
4343

44-
#### Docker container actions
44+
### Docker container actions
4545

4646
Docker containers package the environment with the {% data variables.product.prodname_actions %} code. This creates a more consistent and reliable unit of work because the consumer of the action does not need to worry about the tools or dependencies.
4747

4848
A Docker container allows you to use specific versions of an operating system, dependencies, tools, and code. For actions that must run in a specific environment configuration, Docker is an ideal option because you can customize the operating system and tools. Because of the latency to build and retrieve the container, Docker container actions are slower than JavaScript actions.
4949

5050
Docker container actions can only execute on runners with a Linux operating system. {% data reusables.github-actions.self-hosted-runner-reqs-docker %}
5151

52-
#### JavaScript actions
52+
### JavaScript actions
5353

5454
JavaScript actions can run directly on a runner machine, and separate the action code from the environment used to run the code. Using a JavaScript action simplifies the action code and executes faster than a Docker container action.
5555

5656
{% data reusables.github-actions.pure-javascript %}
5757

5858
If you're developing a Node.js project, the {% data variables.product.prodname_actions %} Toolkit provides packages that you can use in your project to speed up development. For more information, see the [actions/toolkit](https://github.com/actions/toolkit) repository.
5959

60-
#### Composite run steps actions
60+
### Composite run steps actions
6161

6262
A _composite run steps_ action allows you to combine multiple workflow run steps within one action. For example, you can use this feature to bundle together multiple run commands into an action, and then have a workflow that executes the bundled commands a single step using that action. To see an example, check out "[Creating a composite run steps action](/actions/creating-actions/creating-a-composite-run-steps-action)".
6363

64-
### Choosing a location for your action
64+
## Choosing a location for your action
6565

6666
If you're developing an action for other people to use, we recommend keeping the action in its own repository instead of bundling it with other application code. This allows you to version, track, and release the action just like any other software.
6767

@@ -71,7 +71,7 @@ Storing an action in its own repository makes it easier for the {% data variable
7171

7272
{% if currentVersion == "free-pro-team@latest" %}If you're building an action that you don't plan to make available to the public, you {% else %} You{% endif %} can store the action's files in any location in your repository. If you plan to combine action, workflow, and application code in a single repository, we recommend storing actions in the `.github` directory. For example, `.github/actions/action-a` and `.github/actions/action-b`.
7373

74-
### Compatibility with {% data variables.product.prodname_ghe_server %}
74+
## Compatibility with {% data variables.product.prodname_ghe_server %}
7575

7676
To ensure that your action is compatible with {% data variables.product.prodname_ghe_server %}, you should make sure that you do not use any hard-coded references to {% data variables.product.prodname_dotcom %} API URLs. You should instead use environment variables to refer to the {% data variables.product.prodname_dotcom %} API:
7777

@@ -80,19 +80,19 @@ To ensure that your action is compatible with {% data variables.product.prodname
8080

8181
For more information, see "[Default environment variables](/actions/configuring-and-managing-workflows/using-environment-variables#default-environment-variables)."
8282

83-
### Using release management for actions
83+
## Using release management for actions
8484

8585
This section explains how you can use release management to distribute updates to your actions in a predictable way.
8686

87-
#### Good practices for release management
87+
### Good practices for release management
8888

8989
If you're developing an action for other people to use, we recommend using release management to control how you distribute updates. Users can expect an action's major version to include necessary critical fixes and security patches, while still remaining compatible with their existing workflows. You should consider releasing a new major version whenever your changes affect compatibility.
9090

9191
Under this release management approach, users should not be referencing an action's default branch, as it's likely to contain the latest code and consequently might be unstable. Instead, you can recommend that your users specify a major version when using your action, and only direct them to a more specific version if they encounter issues.
9292

9393
To use a specific action version, users can configure their {% data variables.product.prodname_actions %} workflow to target a tag, a commit's SHA, or a branch named for a release.
9494

95-
#### Using tags for release management
95+
### Using tags for release management
9696

9797
We recommend using tags for actions release management. Using this approach, your users can easily distinguish between major and minor versions:
9898

@@ -116,7 +116,7 @@ steps:
116116
- uses: actions/[email protected]
117117
```
118118
119-
#### Using branches for release management
119+
### Using branches for release management
120120
121121
If you prefer to use branch names for release management, this example demonstrates how to reference a named branch:
122122
@@ -125,7 +125,7 @@ steps:
125125
- uses: actions/javascript-action@v1-beta
126126
```
127127
128-
#### Using a commit's SHA for release management
128+
### Using a commit's SHA for release management
129129
130130
Each Git commit receives a calculated SHA value, which is unique and immutable. Your action's users might prefer to rely on a commit's SHA value, as this approach can be more reliable than specifying a tag, which could be deleted or moved. However, this means that users will not receive further updates made to the action. {% if currentVersion == "free-pro-team@latest" or currentVersion ver_gt "[email protected]" or currentVersion == "github-ae@latest" %}You must use a commit's full SHA value, and not an abbreviated value.{% else %}Using a commit's full SHA value instead of the abbreviated value can help prevent people from using a malicious commit that uses the same abbreviation.{% endif %}
131131
@@ -134,7 +134,7 @@ steps:
134134
- uses: actions/javascript-action@172239021f7ba04fe7327647b213799853a9eb89
135135
```
136136
137-
### Creating a README file for your action
137+
## Creating a README file for your action
138138
139139
We recommend creating a README file to help people learn how to use your action. You can include this information in your `README.md`:
140140

@@ -145,11 +145,11 @@ We recommend creating a README file to help people learn how to use your action.
145145
- Environment variables the action uses
146146
- An example of how to use your action in a workflow
147147

148-
### Comparing {% data variables.product.prodname_actions %} to {% data variables.product.prodname_github_apps %}
148+
## Comparing {% data variables.product.prodname_actions %} to {% data variables.product.prodname_github_apps %}
149149

150150
{% data variables.product.prodname_marketplace %} offers tools to improve your workflow. Understanding the differences and the benefits of each tool will allow you to select the best tool for your job. For more information about building apps, see "[About apps](/apps/about-apps/)."
151151

152-
#### Strengths of GitHub Actions and GitHub Apps
152+
### Strengths of GitHub Actions and GitHub Apps
153153

154154
While both {% data variables.product.prodname_actions %} and {% data variables.product.prodname_github_app %}s provide ways to build automation and workflow tools, they each have strengths that make them useful in different ways.
155155

@@ -166,6 +166,6 @@ While both {% data variables.product.prodname_actions %} and {% data variables.p
166166
* Don't require you to deploy code or serve an app.
167167
* Have a simple interface to create and use secrets, which enables actions to interact with third-party services without needing to store the credentials of the person using the action.
168168

169-
### Further reading
169+
## Further reading
170170

171171
- "[Development tools for {% data variables.product.prodname_actions %}](/articles/development-tools-for-github-actions)"

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@ topics:
1515
{% data reusables.actions.enterprise-github-hosted-runners %}
1616
{% data reusables.actions.ae-beta %}
1717

18-
### Introduction
18+
## Introduction
1919

2020
In this guide, you'll learn about the basic components needed to create and use a packaged composite run steps action. To focus this guide on the components needed to package the action, the functionality of the action's code is minimal. The action prints "Hello World" and then "Goodbye", or if you provide a custom name, it prints "Hello [who-to-greet]" and then "Goodbye". The action also maps a random number to the `random-number` output variable, and runs a script named `goodbye.sh`.
2121

2222
Once you complete this project, you should understand how to build your own composite run steps action and test it in a workflow.
2323

2424
{% data reusables.github-actions.context-injection-warning %}
2525

26-
### Prerequisites
26+
## Prerequisites
2727

2828
Before you begin, you'll create a {% data variables.product.product_name %} repository.
2929

@@ -56,7 +56,7 @@ Before you begin, you'll create a {% data variables.product.product_name %} repo
5656
git push
5757
```
5858

59-
### Creating an action metadata file
59+
## Creating an action metadata file
6060

6161
1. In the `hello-world-composite-run-steps-action` repository, create a new file called `action.yml` and add the following example code. For more information about this syntax, see "[`runs` for a composite run steps](/actions/creating-actions/metadata-syntax-for-github-actions#runs-for-composite-run-steps-actions)".
6262

@@ -107,7 +107,7 @@ Before you begin, you'll create a {% data variables.product.product_name %} repo
107107
git push --follow-tags
108108
```
109109

110-
### Testing out your action in a workflow
110+
## Testing out your action in a workflow
111111

112112
The following workflow code uses the completed hello world action that you made in "[Creating an action metadata file](/actions/creating-actions/creating-a-composite-run-steps-action#creating-an-action-metadata-file)".
113113

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

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ topics:
2121
{% data reusables.actions.enterprise-github-hosted-runners %}
2222
{% data reusables.actions.ae-beta %}
2323

24-
### Introduction
24+
## Introduction
2525

2626
In this guide, you'll learn about the basic components needed to create and use a packaged Docker container action. To focus this guide on the components needed to package the action, the functionality of the action's code is minimal. The action prints "Hello World" in the logs or "Hello [who-to-greet]" if you provide a custom name.
2727

@@ -31,7 +31,7 @@ Once you complete this project, you should understand how to build your own Dock
3131

3232
{% data reusables.github-actions.context-injection-warning %}
3333

34-
### Prerequisites
34+
## Prerequisites
3535

3636
You may find it helpful to have a basic understanding of {% data variables.product.prodname_actions %} environment variables and the Docker container filesystem:
3737

@@ -54,7 +54,7 @@ Before you begin, you'll need to create a {% data variables.product.prodname_dot
5454
cd hello-world-docker-action
5555
```
5656

57-
### Creating a Dockerfile
57+
## Creating a Dockerfile
5858

5959
In your new `hello-world-docker-action` directory, create a new `Dockerfile` file. For more information, see "[Dockerfile support for {% data variables.product.prodname_actions %}](/actions/creating-actions/dockerfile-support-for-github-actions)."
6060

@@ -70,7 +70,7 @@ COPY entrypoint.sh /entrypoint.sh
7070
ENTRYPOINT ["/entrypoint.sh"]
7171
```
7272

73-
### Creating an action metadata file
73+
## Creating an action metadata file
7474

7575
Create a new `action.yml` file in the `hello-world-docker-action` directory you created above. For more information, see "[Metadata syntax for {% data variables.product.prodname_actions %}](/actions/creating-actions/metadata-syntax-for-github-actions)."
7676

@@ -100,7 +100,7 @@ This metadata defines one `who-to-greet` input and one `time` output parameter.
100100

101101
{% data variables.product.prodname_dotcom %} will build an image from your `Dockerfile`, and run commands in a new container using this image.
102102

103-
### Writing the action code
103+
## Writing the action code
104104

105105
You can choose any base Docker image and, therefore, any language for your action. The following shell script example uses the `who-to-greet` input variable to print "Hello [who-to-greet]" in the log file.
106106

@@ -126,7 +126,7 @@ Next, the script gets the current time and sets it as an output variable that ac
126126
$ chmod +x entrypoint.sh
127127
```
128128

129-
### Creating a README
129+
## Creating a README
130130

131131
To let people know how to use your action, you can create a README file. A README is most helpful when you plan to share your action publicly, but is also a great way to remind you or your team how to use the action.
132132

@@ -147,13 +147,13 @@ This action prints "Hello World" or "Hello" + the name of a person to greet to t
147147
148148
## Inputs
149149
150-
### `who-to-greet`
150+
## `who-to-greet`
151151
152152
**Required** The name of the person to greet. Default `"World"`.
153153
154154
## Outputs
155155
156-
### `time`
156+
## `time`
157157
158158
The time we greeted you.
159159
@@ -164,7 +164,7 @@ with:
164164
who-to-greet: 'Mona the Octocat'
165165
```
166166

167-
### Commit, tag, and push your action to {% data variables.product.product_name %}
167+
## Commit, tag, and push your action to {% data variables.product.product_name %}
168168

169169
From your terminal, commit your `action.yml`, `entrypoint.sh`, `Dockerfile`, and `README.md` files.
170170

@@ -177,13 +177,13 @@ git tag -a -m "My first action release" v1
177177
git push --follow-tags
178178
```
179179

180-
### Testing out your action in a workflow
180+
## Testing out your action in a workflow
181181

182182
Now you're ready to test your action out in a workflow. When an action is in a private repository, the action can only be used in workflows in the same repository. Public actions can be used by workflows in any repository.
183183

184184
{% data reusables.actions.enterprise-marketplace-actions %}
185185

186-
#### Example using a public action
186+
### Example using a public action
187187

188188
The following workflow code uses the completed _hello world_ action in the public [`actions/hello-world-docker-action`](https://github.com/actions/hello-world-docker-action) repository. Copy the following workflow example code into a `.github/workflows/main.yml` file, but replace the `actions/hello-world-docker-action` with your repository and action name. You can also replace the `who-to-greet` input with your name. {% if currentVersion == "free-pro-team@latest" %}Public actions can be used even if they're not published to {% data variables.product.prodname_marketplace %}. For more information, see "[Publishing an action](/actions/creating-actions/publishing-actions-in-github-marketplace#publishing-an-action)." {% endif %}
189189

@@ -208,7 +208,7 @@ jobs:
208208
```
209209
{% endraw %}
210210

211-
#### Example using a private action
211+
### Example using a private action
212212

213213
Copy the following example workflow code into a `.github/workflows/main.yml` file in your action's repository. You can also replace the `who-to-greet` input with your name. {% if currentVersion == "free-pro-team@latest" %}This private action can't be published to {% data variables.product.prodname_marketplace %}, and can only be used in this repository.{% endif %}
214214

0 commit comments

Comments
 (0)