Skip to content

Commit a3856ee

Browse files
authored
Merge pull request #5645 from github/repo-sync
repo sync
2 parents 9194283 + 863c304 commit a3856ee

5 files changed

Lines changed: 101 additions & 1 deletion

File tree

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

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/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

0 commit comments

Comments
 (0)