Skip to content

Repo sync #39392

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jul 18, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
title: About continuous deployment with GitHub Actions
shortTitle: Continuous deployment
title: Continuous deployment
intro: 'You can create custom continuous deployment (CD) workflows directly in your {% data variables.product.prodname_dotcom %} repository with {% data variables.product.prodname_actions %}.'
versions:
fpt: '*'
Expand All @@ -13,6 +12,7 @@ redirect_from:
- /actions/deployment/about-deployments
- /actions/about-github-actions/about-continuous-deployment
- /actions/about-github-actions/about-continuous-deployment-with-github-actions
- /actions/concepts/overview/about-continuous-deployment-with-github-actions
topics:
- CD
---
Expand All @@ -33,17 +33,10 @@ You can configure your CD workflow to run when an event occurs (for example, whe

{% data variables.product.prodname_actions %} provides features that give you more control over deployments. For example, you can use environments to require approval for a job to proceed, restrict which branches can trigger a workflow, or limit access to secrets. You can use concurrency to limit your CD pipeline to a maximum of one in-progress deployment and one pending deployment. For more information about these features, see [AUTOTITLE](/actions/deployment/about-deployments/deploying-with-github-actions) and [AUTOTITLE](/actions/deployment/targeting-different-environments/managing-environments-for-deployment).

## Using OpenID Connect to access cloud resources

{% data reusables.actions.about-oidc-short-overview %}

## Workflow templates and third party actions
## Workflow templates and third-party actions

{% data reusables.actions.cd-templates-actions %}

## Further reading
## Next steps

* [AUTOTITLE](/actions/use-cases-and-examples/deploying)
* [AUTOTITLE](/actions/deployment/about-deployments/deploying-with-github-actions)
* [AUTOTITLE](/actions/deployment/targeting-different-environments/managing-environments-for-deployment){% ifversion fpt or ghec %}
* [AUTOTITLE](/billing/managing-billing-for-github-actions){% endif %}
If your {% data variables.product.prodname_actions %} workflows need to access resources from a cloud provider that supports OpenID Connect (OIDC), you can configure your workflows to authenticate directly to the cloud provider. This will let you stop storing these credentials as long-lived secrets and provide other security benefits. For more information, see [AUTOTITLE](/actions/deployment/security-hardening-your-deployments/about-security-hardening-with-openid-connect).
27 changes: 27 additions & 0 deletions content/actions/concepts/overview/github-actions-vs-github-apps.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
title: GitHub Actions vs GitHub Apps
shortTitle: Actions vs Apps
intro: 'Learn about the key differences between {% data variables.product.prodname_actions %} and {% data variables.product.prodname_github_apps %} to help you decide which is right for your use cases.'
versions:
fpt: '*'
ghes: '*'
ghec: '*'
type: overview
topics:
- CD
---

{% data variables.product.prodname_marketplace %} offers both {% data variables.product.prodname_actions %} and {% data variables.product.prodname_github_apps %}, each of which can be valuable automation and workflow tools. Understanding the differences and the benefits of each option will allow you to select the best fit for your job.

{% data variables.product.prodname_github_apps %}:
* Run persistently and can react to events quickly.
* Work great when persistent data is needed.
* Work best with API requests that aren't time consuming.
* Run on a server or compute infrastructure that you provide.

{% data variables.product.prodname_actions %}:
* Provide automation that can perform continuous integration and continuous deployment.
* Can run directly on runner machines or in Docker containers.
* Can include access to a clone of your repository, enabling deployment and publishing tools, code formatters, and command line tools to access your code.
* Don't require you to deploy code or serve an app.
* 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.
3 changes: 2 additions & 1 deletion content/actions/concepts/overview/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ versions:
ghes: '*'
ghec: '*'
children:
- /about-continuous-deployment-with-github-actions
- /continuous-integration
- /continuous-deployment
- /github-actions-vs-github-apps
---
115 changes: 2 additions & 113 deletions content/actions/concepts/workflows-and-actions/about-custom-actions.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,117 +65,6 @@ If you're developing a Node.js project, the {% data variables.product.prodname_a

A _composite_ action allows you to combine multiple workflow 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 as a single step using that action. To see an example, check out [AUTOTITLE](/actions/creating-actions/creating-a-composite-action).

## Choosing a location for your action
## Next steps

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.

{% ifversion fpt or ghec %}
Storing an action in its own repository makes it easier for the {% 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.
{% endif %}

{% data reusables.actions.internal-actions-summary %}

{% ifversion fpt or ghec %}If you're building an action that you don't plan to make available to others, 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`.

## Ensuring compatibility with other platforms

Many people access {% data variables.product.github %} at a domain other than {% data variables.product.prodname_dotcom_the_website %}, such as {% data variables.enterprise.data_residency_site %} or a custom domain for {% data variables.product.prodname_ghe_server %}.

To ensure that your action is compatible with other platforms, do not use any hard-coded references to API URLs such as `https://api.github.com`. Instead, you can:

* Use environment variables (see [AUTOTITLE](/actions/reference/variables-reference#default-environment-variables)):

* For the REST API, use the `GITHUB_API_URL` environment variable.
* For GraphQL, use the `GITHUB_GRAPHQL_URL` environment variable.

* Use a toolkit such as [`@actions/github`](https://github.com/actions/toolkit/tree/main/packages/github), which can automatically set the correct URLs.

## Using release management for actions

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

### Good practices for release management

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 patch 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.

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.

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.

### Using tags for release management

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

* Create and validate a release on a release branch (such as `release/v1`) before creating the release tag (for example, `v1.0.2`).
* Create a release using semantic versioning. For more information, see [AUTOTITLE](/repositories/releasing-projects-on-github/managing-releases-in-a-repository).
* Move the major version tag (such as `v1`, `v2`) to point to the Git ref of the current release. For more information, see [Git basics - tagging](https://git-scm.com/book/en/v2/Git-Basics-Tagging).
* Introduce a new major version tag (`v2`) for changes that will break existing workflows. For example, changing an action's inputs would be a breaking change.
* Major versions can be initially released with a `beta` tag to indicate their status, for example, `v2-beta`. The `-beta` tag can then be removed when ready.

This example demonstrates how a user can reference a major release tag:

```yaml
steps:
- uses: actions/javascript-action@v1
```
This example demonstrates how a user can reference a specific patch release tag:
```yaml
steps:
- uses: actions/javascript-action@v1.0.1
```
### Using branches for release management
If you prefer to use branch names for release management, this example demonstrates how to reference a named branch:
```yaml
steps:
- uses: actions/javascript-action@v1-beta
```
### Using a commit's SHA for release management
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. You must use a commit's full SHA value, and not an abbreviated value.
```yaml
steps:
- uses: actions/javascript-action@a824008085750b8e136effc585c3cd6082bd575f
```
## Creating a README file for your action
We recommend creating a README file to help people learn how to use your action. You can include this information in your `README.md`:

* A detailed description of what the action does
* Required input and output arguments
* Optional input and output arguments
* Secrets the action uses
* Environment variables the action uses
* An example of how to use your action in a workflow

## Comparing {% data variables.product.prodname_actions %} to {% data variables.product.prodname_github_apps %}

{% 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 [AUTOTITLE](/apps/creating-github-apps/setting-up-a-github-app/about-creating-github-apps).

### Strengths of GitHub Actions and GitHub Apps

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

{% data variables.product.prodname_github_apps %}:
* Run persistently and can react to events quickly.
* Work great when persistent data is needed.
* Work best with API requests that aren't time consuming.
* Run on a server or compute infrastructure that you provide.

{% data variables.product.prodname_actions %}:
* Provide automation that can perform continuous integration and continuous deployment.
* Can run directly on runner machines or in Docker containers.
* Can include access to a clone of your repository, enabling deployment and publishing tools, code formatters, and command line tools to access your code.
* Don't require you to deploy code or serve an app.
* 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.

## Further reading

* [AUTOTITLE](/actions/using-workflows/workflow-commands-for-github-actions)
To learn about how to manage your custom actions, see [AUTOTITLE](/actions/how-tos/administering-github-actions/managing-custom-actions).
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ versions:
children:
- /viewing-github-actions-metrics
- /making-retired-namespaces-available-on-ghecom
- /managing-custom-actions
redirect_from:
- /actions/administering-github-actions
---
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
---
title: Managing custom actions
intro: 'Learn how to create and manage your own actions, and customize actions shared by the {% data variables.product.prodname_dotcom %} community.'
versions:
fpt: '*'
ghes: '*'
ghec: '*'
type: overview
topics:
- Action development
- Fundamentals
---

## Choosing a location for your action

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.

{% ifversion fpt or ghec %}
Storing an action in its own repository makes it easier for the {% 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.
{% endif %}

{% data reusables.actions.internal-actions-summary %}

{% ifversion fpt or ghec %}If you're building an action that you don't plan to make available to others, 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`.

## Ensuring compatibility with other platforms

Many people access {% data variables.product.github %} at a domain other than {% data variables.product.prodname_dotcom_the_website %}, such as {% data variables.enterprise.data_residency_site %} or a custom domain for {% data variables.product.prodname_ghe_server %}.

To ensure that your action is compatible with other platforms, do not use any hard-coded references to API URLs such as `https://api.github.com`. Instead, you can:

* Use environment variables (see [AUTOTITLE](/actions/reference/variables-reference#default-environment-variables)):

* For the REST API, use the `GITHUB_API_URL` environment variable.
* For GraphQL, use the `GITHUB_GRAPHQL_URL` environment variable.

* Use a toolkit such as [`@actions/github`](https://github.com/actions/toolkit/tree/main/packages/github), which can automatically set the correct URLs.

## Using release management for actions

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

### Good practices for release management

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 patch 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.

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.

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.

### Using tags for release management

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

* Create and validate a release on a release branch (such as `release/v1`) before creating the release tag (for example, `v1.0.2`).
* Create a release using semantic versioning. For more information, see [AUTOTITLE](/repositories/releasing-projects-on-github/managing-releases-in-a-repository).
* Move the major version tag (such as `v1`, `v2`) to point to the Git ref of the current release. For more information, see [Git basics - tagging](https://git-scm.com/book/en/v2/Git-Basics-Tagging).
* Introduce a new major version tag (`v2`) for changes that will break existing workflows. For example, changing an action's inputs would be a breaking change.
* Major versions can be initially released with a `beta` tag to indicate their status, for example, `v2-beta`. The `-beta` tag can then be removed when ready.

This example demonstrates how a user can reference a major release tag:

```yaml
steps:
- uses: actions/javascript-action@v1
```

This example demonstrates how a user can reference a specific patch release tag:

```yaml
steps:
- uses: actions/javascript-action@v1.0.1
```

### Using branches for release management

If you prefer to use branch names for release management, this example demonstrates how to reference a named branch:

```yaml
steps:
- uses: actions/javascript-action@v1-beta
```

### Using a commit's SHA for release management

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. You must use a commit's full SHA value, and not an abbreviated value.

```yaml
steps:
- uses: actions/javascript-action@a824008085750b8e136effc585c3cd6082bd575f
```

## Creating a README file for your action

We recommend creating a README file to help people learn how to use your action. You can include this information in your `README.md`:

* A detailed description of what the action does
* Required input and output arguments
* Optional input and output arguments
* Secrets the action uses
* Environment variables the action uses
* An example of how to use your action in a workflow
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ shortTitle: Monitor & troubleshoot

{% data reusables.actions.enterprise-github-hosted-runners %}

## Using repository-level self-hosted runners
## Checking access levels

You may not be able to create a self-hosted runner for an organization-owned repository.

Expand Down
Loading
Loading