forked from github/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.
Merge branch 'main' into update-new-site-tree-deps
- Loading branch information
Showing
13 changed files
with
138 additions
and
4 deletions.
There are no files selected for viewing
Binary file added
BIN
+115 KB
assets/images/help/pull_requests/actions-approve-and-run-workflows-from-fork.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
19 changes: 19 additions & 0 deletions
19
...ent/actions/managing-workflow-runs/approving-workflow-runs-from-public-forks.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,19 @@ | ||
--- | ||
title: Approving workflow runs from public forks | ||
intro: 'When a first-time contributor submits a pull request to a public repository, a maintainer with write access must approve any workflow runs.' | ||
product: '{% data reusables.gated-features.actions %}' | ||
versions: | ||
free-pro-team: '*' | ||
--- | ||
|
||
Forks of public repositories can submit pull requests that propose changes to a repository's {% data variables.product.prodname_actions %} workflows. Although workflows from forks do not have access to sensitive data such as secrets, they can be an annoyance for maintainers if they are modified for abusive purposes. To help prevent this, workflows on pull requests are not run automatically if they are received from first-time contributors, and must be approved first. | ||
|
||
Maintainers with write access to the repository can use the following procedure to review and run workflows on pull requests from first-time contributors. After a contributor has at least one pull request merged into a project's repository, any future pull requests from that contributor's fork will automatically run workflows. | ||
|
||
{% data reusables.repositories.sidebar-pr %} | ||
{% data reusables.repositories.choose-pr-review %} | ||
{% data reusables.repositories.changed-files %} | ||
1. Inspect the proposed changes in the pull request and ensure that you are comfortable running your workflows on the pull request branch. You should be especially alert to any proposed changes in the `.github/workflows/` directory that affect workflow files. | ||
1. If you are comfortable with running workflows on the pull request branch, return to the {% octicon "comment-discussion" aria-label="The discussion icon" %} **Conversation** tab, and under "Workflow(s) awaiting approval", click **Approve and run**. | ||
|
||
![Approve and run workflows](/assets/images/help/pull_requests/actions-approve-and-run-workflows-from-fork.png) |
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
92 changes: 92 additions & 0 deletions
92
content/actions/using-github-hosted-runners/customizing-github-hosted-runners.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,92 @@ | ||
--- | ||
title: Customizing GitHub-hosted runners | ||
intro: >- | ||
You can install additional software on GitHub-hosted runners as a | ||
part of your workflow. | ||
product: '{% data reusables.gated-features.actions %}' | ||
versions: | ||
free-pro-team: '*' | ||
enterprise-server: '>=2.22' | ||
type: tutorial | ||
topics: | ||
- Workflows | ||
--- | ||
|
||
{% data reusables.actions.enterprise-github-hosted-runners %} | ||
|
||
If you require additional software packages on {% data variables.product.prodname_dotcom %}-hosted runners, you can create a job that installs the packages as part of your workflow. | ||
|
||
To see which packages are already installed by default, see "[Preinstalled software](/actions/using-github-hosted-runners/about-github-hosted-runners#preinstalled-software)." | ||
|
||
This guide demonstrates how to create a job that installs additional software on a {% data variables.product.prodname_dotcom %}-hosted runner. | ||
|
||
### Installing software on Ubuntu runners | ||
|
||
The following example demonstrates how to install an `apt` package as part of a job. | ||
|
||
{% raw %} | ||
```yaml | ||
name: Build on Ubuntu | ||
on: push | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out repository code | ||
uses: actions/checkout@v2 | ||
- name: Install jq tool | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install jq | ||
``` | ||
{% endraw %} | ||
{% note %} | ||
**Note:** Always run `sudo apt-get update` before installing a package. In case the `apt` index is stale, this command fetches and re-indexes any available packages, which helps prevent package installation failures. | ||
|
||
{% endnote %} | ||
|
||
### Installing software on macOS runners | ||
|
||
The following example demonstrates how to install Brew packages and casks as part of a job. | ||
|
||
{% raw %} | ||
```yaml | ||
name: Build on macOS | ||
on: push | ||
jobs: | ||
build: | ||
runs-on: macos-latest | ||
steps: | ||
- name: Check out repository code | ||
uses: actions/checkout@v2 | ||
- name: Install GitHub CLI | ||
run: | | ||
brew update | ||
brew install gh | ||
- name: Install Microsoft Edge | ||
run: | | ||
brew update | ||
brew install --cask microsoft-edge | ||
``` | ||
{% endraw %} | ||
|
||
### Installing software on Windows runners | ||
|
||
The following example demonstrates how to use [Chocolatey](https://community.chocolatey.org/packages) to install the {% data variables.product.prodname_dotcom %} CLI as part of a job. | ||
|
||
{% raw %} | ||
```yaml | ||
name: Build on Windows | ||
on: push | ||
jobs: | ||
build: | ||
runs-on: windows-latest | ||
steps: | ||
- run: choco install gh | ||
- run: gh version | ||
``` | ||
{% endraw %} |
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