forked from davidmerwin/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
159 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
.../actions/creating-actions/sharing-actions-and-workflows-with-your-enterprise.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
--- | ||
title: Sharing actions and workflows with your enterprise | ||
intro: 'You can share an action or workflow with your enterprise without publishing the action or workflow publicly.' | ||
versions: | ||
feature: 'internal-actions' | ||
type: tutorial | ||
topics: | ||
- Actions | ||
- Action development | ||
shortTitle: Share with your enterprise | ||
--- | ||
|
||
{% note %} | ||
|
||
**Note:** Allowing workflows to access internal repositories is currently in beta and subject to change. | ||
|
||
{% endnote %} | ||
|
||
## About {% data variables.product.prodname_actions %} access to internal repositories | ||
|
||
If your organization is owned by an enterprise account, you can share actions and workflows within your enterprise, without publishing the action or workflow publicly, by allowing {% data variables.product.prodname_actions %} workflows to access an internal repository that contains the action or workflow. | ||
|
||
Any actions or workflows stored in the internal repository can be used in workflows defined in other private and internal repositories owned by the same organization, or by any organization owned by the enterprise. Actions and workflows stored in internal repositories cannot be used in public repositories. | ||
|
||
{% warning %} | ||
|
||
**Warning**: {% data reusables.actions.outside-collaborators-internal-actions %} | ||
|
||
{% endwarning %} | ||
|
||
## Sharing actions and workflows with your enterprise | ||
|
||
1. Store the action or workflow in an internal repository. For more information, see "[About repositories](/repositories/creating-and-managing-repositories/about-repositories#about-internal-repositories)." | ||
1. Configure the repository to allow access to workflows in other private and internal repositories. For more information, see "[Managing {% data variables.product.prodname_actions %} settings for a repository](/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#allowing-access-to-components-in-an-internal-repository)." | ||
|
||
## Further reading | ||
|
||
- "[About enterprise accounts](/admin/overview/about-enterprise-accounts)" | ||
- "[Reusing workflows](/actions/using-workflows/reusing-workflows)" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,8 +24,9 @@ topics: | |
|
||
The actions you use in your workflow can be defined in: | ||
|
||
- A public repository | ||
- The same repository where your workflow file references the action | ||
- The same repository as your workflow file{% if internal-actions %} | ||
- An internal repository within the same enterprise account that is configured to allow access to workflows{% endif %} | ||
- Any public repository | ||
- A published Docker container image on Docker Hub | ||
|
||
{% data variables.product.prodname_marketplace %} is a central location for you to find actions created by the {% data variables.product.prodname_dotcom %} community.{% ifversion fpt or ghec %} [{% data variables.product.prodname_marketplace %} page](https://github.com/marketplace/actions/) enables you to filter for actions by category. {% endif %} | ||
|
@@ -46,6 +47,10 @@ You can search and browse actions directly in your repository's workflow editor. | |
|
||
## Adding an action to your workflow | ||
|
||
You can add an action to your workflow by referencing the action in your workflow file. | ||
|
||
### Adding an action from {% data variables.product.prodname_marketplace %} | ||
|
||
An action's listing page includes the action's version and the workflow syntax required to use the action. To keep your workflow stable even when updates are made to an action, you can reference the version of the action to use by specifying the Git or Docker tag number in your workflow file. | ||
|
||
1. Navigate to the action you want to use in your workflow. | ||
|
@@ -58,6 +63,66 @@ An action's listing page includes the action's version and the workflow syntax r | |
|
||
{% endif %} | ||
|
||
### Adding an action from the same repository | ||
|
||
If an action is defined in the same repository where your workflow file uses the action, you can reference the action with either the `{owner}/{repo}@{ref}` or `./path/to/dir` syntax in your workflow file. | ||
|
||
Example repository file structure: | ||
|
||
``` | ||
|-- hello-world (repository) | ||
| |__ .github | ||
| └── workflows | ||
| └── my-first-workflow.yml | ||
| └── actions | ||
| |__ hello-world-action | ||
| └── action.yml | ||
``` | ||
|
||
Example workflow file: | ||
|
||
```yaml | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
# This step checks out a copy of your repository. | ||
- uses: actions/checkout@v2 | ||
# This step references the directory that contains the action. | ||
- uses: ./.github/actions/hello-world-action | ||
``` | ||
The `action.yml` file is used to provide metadata for the action. Learn about the content of this file in "[Metadata syntax for GitHub Actions](/actions/creating-actions/metadata-syntax-for-github-actions)." | ||
|
||
### Adding an action from a different repository | ||
|
||
If an action is defined in a different repository than your workflow file, you can reference the action with the `{owner}/{repo}@{ref}` syntax in your workflow file. | ||
|
||
The action must be stored in a public repository{% if internal-actions %} or an internal repository that is configured to allow access to workflows. For more information, see "[Sharing actions and workflows with your enterprise](/actions/creating-actions/sharing-actions-and-workflows-with-your-enterprise)."{% else %}.{% endif %} | ||
|
||
```yaml | ||
jobs: | ||
my_first_job: | ||
steps: | ||
- name: My first step | ||
uses: actions/[email protected] | ||
``` | ||
|
||
### Referencing a container on Docker Hub | ||
|
||
If an action is defined in a published Docker container image on Docker Hub, you must reference the action with the `docker://{image}:{tag}` syntax in your workflow file. To protect your code and data, we strongly recommend you verify the integrity of the Docker container image from Docker Hub before using it in your workflow. | ||
|
||
```yaml | ||
jobs: | ||
my_first_job: | ||
steps: | ||
- name: My first step | ||
uses: docker://alpine:3.8 | ||
``` | ||
|
||
For some examples of Docker actions, see the [Docker-image.yml workflow](https://github.com/actions/starter-workflows/blob/main/ci/docker-image.yml) and "[Creating a Docker container action](/articles/creating-a-docker-container-action)." | ||
|
||
|
||
## Using release management for your custom actions | ||
|
||
The creators of a community action have the option to use tags, branches, or SHA values to manage releases of the action. Similar to any dependency, you should indicate the version of the action you'd like to use based on your comfort with automatically accepting updates to the action. | ||
|
@@ -127,51 +192,6 @@ outputs: | |
By default, you can use most of the official {% data variables.product.prodname_dotcom %}-authored actions in {% data variables.product.prodname_ghe_managed %}. For more information, see "[Using actions in {% data variables.product.prodname_ghe_managed %}](/admin/github-actions/using-actions-in-github-ae)." | ||
{% endif %} | ||
|
||
## Referencing an action in the same repository where a workflow file uses the action | ||
|
||
If an action is defined in the same repository where your workflow file uses the action, you can reference the action with either the `{owner}/{repo}@{ref}` or `./path/to/dir` syntax in your workflow file. | ||
|
||
Example repository file structure: | ||
|
||
``` | ||
|-- hello-world (repository) | ||
| |__ .github | ||
| └── workflows | ||
| └── my-first-workflow.yml | ||
| └── actions | ||
| |__ hello-world-action | ||
| └── action.yml | ||
``` | ||
|
||
Example workflow file: | ||
|
||
```yaml | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
# This step checks out a copy of your repository. | ||
- uses: actions/checkout@v2 | ||
# This step references the directory that contains the action. | ||
- uses: ./.github/actions/hello-world-action | ||
``` | ||
|
||
The `action.yml` file is used to provide metadata for the action. Learn about the content of this file in "[Metadata syntax for GitHub Actions](/actions/creating-actions/metadata-syntax-for-github-actions)" | ||
|
||
## Referencing a container on Docker Hub | ||
|
||
If an action is defined in a published Docker container image on Docker Hub, you must reference the action with the `docker://{image}:{tag}` syntax in your workflow file. To protect your code and data, we strongly recommend you verify the integrity of the Docker container image from Docker Hub before using it in your workflow. | ||
|
||
```yaml | ||
jobs: | ||
my_first_job: | ||
steps: | ||
- name: My first step | ||
uses: docker://alpine:3.8 | ||
``` | ||
|
||
For some examples of Docker actions, see the [Docker-image.yml workflow](https://github.com/actions/starter-workflows/blob/main/ci/docker-image.yml) and "[Creating a Docker container action](/articles/creating-a-docker-container-action)." | ||
|
||
## Next steps | ||
|
||
To continue learning about {% data variables.product.prodname_actions %}, see "[Essential features of {% data variables.product.prodname_actions %}](/actions/learn-github-actions/essential-features-of-github-actions)." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
versions: | ||
ghec: '*' | ||
ghes: '>=3.5' | ||
ghae: 'issue-5610' |
Oops, something went wrong.