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/about-actions.md
+21-21Lines changed: 21 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
2
title: About actions
3
-
intro: 'Actions are individual tasks that you can combine to create jobs and customize your workflow. You can create your own actions, or use and customize actions shared by the {{ site.data.variables.product.prodname_dotcom }} community.'
intro: 'Actions are individual tasks that you can combine to create jobs and customize your workflow. You can create your own actions, or use and customize actions shared by the {% datavariables.product.prodname_dotcom %} community.'
You can create actions by writing custom code that interacts with your repository in any way you'd like, including integrating with {{ site.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.
20
+
You can create actions by writing custom code that interacts with your repository in any way you'd like, including integrating with {% datavariables.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.
21
21
22
22
{% if currentVersion == "free-pro-team@latest" %}
23
-
You can write your own actions to use in your workflow or share the actions you build with the {{ site.data.variables.product.prodname_dotcom }} community. To share actions you've built, your repository must be public.
23
+
You can write your own actions to use in your workflow or share the actions you build with the {% datavariables.product.prodname_dotcom %} community. To share actions you've built, your repository must be public.
24
24
{% endif %}
25
25
26
26
Actions can run directly on a machine or in a Docker container. You can define an action's inputs, outputs, and environment variables.
27
27
28
28
### Types of actions
29
29
30
-
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 {{ site.data.variables.product.prodname_actions }}](/articles/metadata-syntax-for-github-actions)."
30
+
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 {% datavariables.product.prodname_actions %}](/articles/metadata-syntax-for-github-actions)."
31
31
32
32
| Type | Operating system |
33
33
| ---- | ------------------- |
@@ -37,19 +37,19 @@ You can build Docker container and JavaScript actions. Actions require a metadat
37
37
38
38
#### Docker container actions
39
39
40
-
Docker containers package the environment with the {{ site.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.
40
+
Docker containers package the environment with the {% datavariables.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.
41
41
42
42
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.
43
43
44
-
Docker container actions can only execute on runners with a Linux operating system. {{ site.data.reusables.github-actions.self-hosted-runner-reqs-docker }}
44
+
Docker container actions can only execute on runners with a Linux operating system. {% datareusables.github-actions.self-hosted-runner-reqs-docker %}
45
45
46
46
#### JavaScript actions
47
47
48
48
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.
If you're developing a Node.js project, the {{ site.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.
52
+
If you're developing a Node.js project, the {% datavariables.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.
53
53
54
54
#### Composite run steps actions
55
55
@@ -60,14 +60,14 @@ A _composite run steps_ action allows you to combine multiple workflow run steps
60
60
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.
61
61
62
62
{% if currentVersion == "free-pro-team@latest" %}
63
-
Storing an action in its own repository makes it easier for the {{ site.data.variables.product.prodname_dotcom }} community to discover the action, narrows the scope of the code base for developers fixing issues and extending the action, and decouples the action's versioning from the versioning of other application code.
63
+
Storing an action in its own repository makes it easier for the {% datavariables.product.prodname_dotcom %} community to discover the action, narrows the scope of the code base for developers fixing issues and extending the action, and decouples the action's versioning from the versioning of other application code.
64
64
{% endif %}
65
65
66
66
{% 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`.
67
67
68
-
### Compatibility with {{ site.data.variables.product.prodname_ghe_server }}
68
+
### Compatibility with {% datavariables.product.prodname_ghe_server %}
69
69
70
-
To ensure that your action is compatible with {{ site.data.variables.product.prodname_ghe_server }}, you should make sure that you do not use any hard-coded references to {{ site.data.variables.product.prodname_dotcom }} API URLs. You should instead use environment variables to refer to the {{ site.data.variables.product.prodname_dotcom }} API:
70
+
To ensure that your action is compatible with {% datavariables.product.prodname_ghe_server %}, you should make sure that you do not use any hard-coded references to {% datavariables.product.prodname_dotcom %} API URLs. You should instead use environment variables to refer to the {% datavariables.product.prodname_dotcom %} API:
71
71
72
72
- For the REST API, use the `GITHUB_API_URL` environment variable.
73
73
- For GraphQL, use the `GITHUB_GRAPHQL_URL` environment variable.
@@ -84,7 +84,7 @@ If you're developing an action for other people to use, we recommend using relea
84
84
85
85
Under this release management approach, users should not be referencing an action's `master` 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.
86
86
87
-
To use a specific action version, users can configure their {{ site.data.variables.product.prodname_actions }} workflow to target a tag, a commit's SHA, or a branch named for a release.
87
+
To use a specific action version, users can configure their {% datavariables.product.prodname_actions %} workflow to target a tag, a commit's SHA, or a branch named for a release.
88
88
89
89
#### Using tags for release management
90
90
@@ -139,21 +139,21 @@ We recommend creating a README file to help people learn how to use your action.
139
139
- Environment variables the action uses
140
140
- An example of how to use your action in a workflow
141
141
142
-
### Comparing {{ site.data.variables.product.prodname_actions }} to {{ site.data.variables.product.prodname_github_apps}}
142
+
### Comparing {% datavariables.product.prodname_actions %} to {% datavariables.product.prodname_github_apps %}
143
143
144
-
{{ site.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/)."
144
+
{% datavariables.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/)."
145
145
146
146
#### Strengths of GitHub Actions and GitHub Apps
147
147
148
-
While both {{ site.data.variables.product.prodname_actions }} and {{ site.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.
148
+
While both {% datavariables.product.prodname_actions %} and {% datavariables.product.prodname_github_app %}s provide ways to build automation and workflow tools, they each have strengths that make them useful in different ways.
* Provide automation that can perform continuous integration and continuous deployment.
158
158
* Can run directly on runner machines or in Docker containers.
159
159
* Can include access to a clone of your repository, enabling deployment and publishing tools, code formatters, and command line tools to access your code.
@@ -162,4 +162,4 @@ While both {{ site.data.variables.product.prodname_actions }} and {{ site.data.v
162
162
163
163
### Further reading
164
164
165
-
- "[Development tools for {{ site.data.variables.product.prodname_actions }}](/articles/development-tools-for-github-actions)"
165
+
- "[Development tools for {% datavariables.product.prodname_actions %}](/articles/development-tools-for-github-actions)"
@@ -18,9 +18,9 @@ Once you complete this project, you should understand how to build your own comp
18
18
19
19
### Prerequisites
20
20
21
-
Before you begin, you'll create a {{ site.data.variables.product.product_name }} repository.
21
+
Before you begin, you'll create a {% datavariables.product.product_name %} repository.
22
22
23
-
1. Create a new public repository on {{ site.data.variables.product.product_location }}. You can choose any repository name, or use the following `hello-world-composite-run-steps-action` example. You can add these files after your project has been pushed to {{ site.data.variables.product.product_name }}. For more information, see "[Create a new repository](/articles/creating-a-new-repository)."
23
+
1. Create a new public repository on {% datavariables.product.product_location %}. You can choose any repository name, or use the following `hello-world-composite-run-steps-action` example. You can add these files after your project has been pushed to {% datavariables.product.product_name %}. For more information, see "[Create a new repository](/articles/creating-a-new-repository)."
24
24
25
25
1. Clone your repository to your computer. For more information, see "[Cloning a repository](/articles/cloning-a-repository)."
0 commit comments