Skip to content

Commit faf4a29

Browse files
committed
Merge branch 'main' of github.com:github/docs-internal into toggle-images
2 parents a9cef6b + 8429a3b commit faf4a29

13 files changed

Lines changed: 138 additions & 4 deletions
115 KB
Loading

content/actions/learn-github-actions/migrating-from-circleci-to-github-actions.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,9 @@ jobs:
443443
path: vendor/bundle
444444
key: administrate-${{ matrix.image }}-${{ hashFiles('Gemfile.lock') }}
445445
- name: Install postgres headers
446-
run: sudo apt-get install libpq-dev
446+
run: |
447+
sudo apt-get update
448+
sudo apt-get install libpq-dev
447449
- name: Install dependencies
448450
run: bundle install --path vendor/bundle
449451
- name: Setup environment configuration
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
title: Approving workflow runs from public forks
3+
intro: 'When a first-time contributor submits a pull request to a public repository, a maintainer with write access must approve any workflow runs.'
4+
product: '{% data reusables.gated-features.actions %}'
5+
versions:
6+
free-pro-team: '*'
7+
---
8+
9+
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.
10+
11+
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.
12+
13+
{% data reusables.repositories.sidebar-pr %}
14+
{% data reusables.repositories.choose-pr-review %}
15+
{% data reusables.repositories.changed-files %}
16+
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.
17+
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**.
18+
19+
![Approve and run workflows](/assets/images/help/pull_requests/actions-approve-and-run-workflows-from-fork.png)

content/actions/managing-workflow-runs/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ versions:
2626
{% link_in_list /manually-running-a-workflow %}
2727
{% link_in_list /re-running-a-workflow %}
2828
{% link_in_list /canceling-a-workflow %}
29+
{% link_in_list /approving-workflow-runs-from-public-forks %}
2930
{% link_in_list /reviewing-deployments %}
3031
{% link_in_list /disabling-and-enabling-a-workflow %}
3132
{% link_in_list /deleting-a-workflow-run %}

content/actions/using-github-hosted-runners/about-github-hosted-runners.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,10 @@ We recommend using actions to interact with the software installed on runners. T
9393

9494
If there is a tool that you'd like to request, please open an issue at [actions/virtual-environments](https://github.com/actions/virtual-environments). This repository also contains announcements about all major software updates on runners.
9595

96+
#### Installing additional software
97+
98+
You can install additional software on {% data variables.product.prodname_dotcom %}-hosted runners. For more information, see "[Customizing GitHub-hosted runners](/actions/using-github-hosted-runners/customizing-github-hosted-runners)".
99+
96100
### IP addresses
97101

98102
{% note %}
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
---
2+
title: Customizing GitHub-hosted runners
3+
intro: >-
4+
You can install additional software on GitHub-hosted runners as a
5+
part of your workflow.
6+
product: '{% data reusables.gated-features.actions %}'
7+
versions:
8+
free-pro-team: '*'
9+
enterprise-server: '>=2.22'
10+
type: tutorial
11+
topics:
12+
- Workflows
13+
---
14+
15+
{% data reusables.actions.enterprise-github-hosted-runners %}
16+
17+
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.
18+
19+
To see which packages are already installed by default, see "[Preinstalled software](/actions/using-github-hosted-runners/about-github-hosted-runners#preinstalled-software)."
20+
21+
This guide demonstrates how to create a job that installs additional software on a {% data variables.product.prodname_dotcom %}-hosted runner.
22+
23+
### Installing software on Ubuntu runners
24+
25+
The following example demonstrates how to install an `apt` package as part of a job.
26+
27+
{% raw %}
28+
```yaml
29+
name: Build on Ubuntu
30+
on: push
31+
32+
jobs:
33+
build:
34+
runs-on: ubuntu-latest
35+
steps:
36+
- name: Check out repository code
37+
uses: actions/checkout@v2
38+
- name: Install jq tool
39+
run: |
40+
sudo apt-get update
41+
sudo apt-get install jq
42+
```
43+
{% endraw %}
44+
45+
{% note %}
46+
47+
**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.
48+
49+
{% endnote %}
50+
51+
### Installing software on macOS runners
52+
53+
The following example demonstrates how to install Brew packages and casks as part of a job.
54+
55+
{% raw %}
56+
```yaml
57+
name: Build on macOS
58+
on: push
59+
60+
jobs:
61+
build:
62+
runs-on: macos-latest
63+
steps:
64+
- name: Check out repository code
65+
uses: actions/checkout@v2
66+
- name: Install GitHub CLI
67+
run: |
68+
brew update
69+
brew install gh
70+
- name: Install Microsoft Edge
71+
run: |
72+
brew update
73+
brew install --cask microsoft-edge
74+
```
75+
{% endraw %}
76+
77+
### Installing software on Windows runners
78+
79+
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.
80+
81+
{% raw %}
82+
```yaml
83+
name: Build on Windows
84+
on: push
85+
jobs:
86+
build:
87+
runs-on: windows-latest
88+
steps:
89+
- run: choco install gh
90+
- run: gh version
91+
```
92+
{% endraw %}

content/actions/using-github-hosted-runners/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ versions:
1111
{% data reusables.actions.enterprise-github-hosted-runners %}
1212

1313
{% link_in_list /about-github-hosted-runners %}
14+
{% link_in_list /customizing-github-hosted-runners %}
1415
{% link_in_list /about-ae-hosted-runners %}
1516
{% link_in_list /adding-ae-hosted-runners %}
1617
{% link_in_list /using-ae-hosted-runners-in-a-workflow %}

content/admin/github-actions/using-the-latest-version-of-the-official-bundled-actions.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,19 @@ You can use {% data variables.product.prodname_github_connect %} to allow {% dat
2626

2727
Once {% data variables.product.prodname_github_connect %} is configured, you can use the latest version of an action by deleting its local repository in the `actions` organization on your instance. For example, if your enterprise instance is using the `actions/checkout@v1` action, and you need to use `actions/checkout@v2` which isn't available on your enterprise instance, perform the following steps to be able to use the latest `checkout` action from {% data variables.product.prodname_dotcom_the_website %}:
2828

29-
1. To get the required access to delete the `checkout` repository, use the `ghe-org-admin-promote` command to promote a user to be an owner of the bundled `actions` organization. For more information, see "[Accessing the administrative shell (SSH)](/admin/configuration/accessing-the-administrative-shell-ssh)" and "[`ghe-org-admin-promote`](/admin/configuration/command-line-utilities#ghe-org-admin-promote)." For example:
29+
1. By default, site administrators are not owners of the bundled actions organization. To get the required access to delete the `checkout` repository, use the `ghe-org-admin-promote` command to promote a user to be an owner of the bundled `actions` organization. For more information, see "[Accessing the administrative shell (SSH)](/admin/configuration/accessing-the-administrative-shell-ssh)" and "[`ghe-org-admin-promote`](/admin/configuration/command-line-utilities#ghe-org-admin-promote)." For example:
3030

3131
```shell
32-
ghe-org-admin-promote -u <em>USERNAME</em> -o actions
32+
$ ghe-org-admin-promote -u octocat -o actions
33+
Do you want to give organization admin privileges for actions to octocat? (y/N) y
34+
Making octocat an admin of actions
35+
--> Adding octocat as an admin of actions
36+
--> octocat is now an admin of the actions organization
37+
--> Done.
3338
```
3439
1. On your {% data variables.product.product_name %} instance, delete the `checkout` repository within the `actions` organization. For information on how to delete a repository, see "[Deleting a repository
3540
](/github/administering-a-repository/deleting-a-repository)."
41+
1. It is recommended that you leave the `actions` organization once you no longer require administrative access. For more information, see "[Removing yourself from an organization
42+
](/github/setting-up-and-managing-your-github-user-account/removing-yourself-from-an-organization)."
3643
1. Configure your workflow's YAML to use `actions/checkout@v2`.
3744
1. Each time your workflow runs, the runner will use the `v2` version of `actions/checkout` from {% data variables.product.prodname_dotcom_the_website %}.

content/github/authenticating-to-github/adding-a-new-ssh-key-to-your-github-account.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ After adding a new SSH key to your {% data variables.product.product_name %} acc
8787
If your SSH public key file has a different name than the example code, modify the filename to match your current setup. When copying your key, don't add any newlines or whitespace.
8888

8989
```shell
90+
$ sudo apt-get update
9091
$ sudo apt-get install xclip
9192
# Downloads and installs xclip. If you don't have `apt-get`, you might need to use another installer (like `yum`)
9293

content/github/authenticating-to-github/using-ssh-over-the-https-port.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ topics:
1111

1212
{% tip %}
1313

14-
**GitHub Enterprise users**: Accessing GitHub Enterprise via SSH over the HTTPS port is currently not supported.
14+
**{% data variables.product.prodname_ghe_server %} users**: Accessing {% data variables.product.prodname_ghe_server %} via SSH over the HTTPS port is currently not supported.
1515

1616
{% endtip %}
1717

0 commit comments

Comments
 (0)