Skip to content

Commit c6527d5

Browse files
committed
Merge branch 'script-to-move-toc-links-into-frontmatter' of github.com:github/docs-internal into refactor-site-tree
2 parents e06574b + bec9cfd commit c6527d5

97 files changed

Lines changed: 578 additions & 275 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

content/actions/guides/index.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ includeGuides:
4242
- /actions/guides/building-and-testing-java-with-maven
4343
- /actions/guides/building-and-testing-java-with-gradle
4444
- /actions/guides/building-and-testing-java-with-ant
45+
- /actions/guides/installing-an-apple-certificate-on-macos-runners-for-xcode-development
4546
- /actions/guides/publishing-nodejs-packages
4647
- /actions/guides/publishing-java-packages-with-maven
4748
- /actions/guides/publishing-java-packages-with-gradle
@@ -81,6 +82,7 @@ includeGuides:
8182
<!-- {% link_in_list /building-and-testing-java-with-maven %} -->
8283
<!-- {% link_in_list /building-and-testing-java-with-gradle %} -->
8384
<!-- {% link_in_list /building-and-testing-java-with-ant %} -->
85+
<!-- {% link_in_list /installing-an-apple-certificate-on-macos-runners-for-xcode-development %} -->
8486
<!-- {% link_in_list /about-packaging-with-github-actions %} -->
8587
<!-- {% link_in_list /publishing-nodejs-packages %} -->
8688
<!-- {% link_in_list /publishing-java-packages-with-maven %} -->
Lines changed: 135 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,135 @@
1+
---
2+
title: Installing an Apple certificate on macOS runners for Xcode development
3+
intro: 'You can sign Xcode apps within your continuous integration (CI) workflow by installing an Apple code signing certificate on {% data variables.product.prodname_actions %} runners.'
4+
product: '{% data reusables.gated-features.actions %}'
5+
versions:
6+
free-pro-team: '*'
7+
enterprise-server: '>=2.22'
8+
github-ae: '*'
9+
type: 'tutorial'
10+
topics:
11+
- 'CI'
12+
- 'Xcode'
13+
---
14+
15+
{% data reusables.actions.enterprise-beta %}
16+
{% data reusables.actions.enterprise-github-hosted-runners %}
17+
{% data reusables.actions.ae-beta %}
18+
19+
### Introduction
20+
21+
This guide shows you how to add a step to your continuous integration (CI) workflow that installs an Apple code signing certificate and provisioning profile on {% data variables.product.prodname_actions %} runners. This will allow you to sign your Xcode apps for publishing to the Apple App Store, or distributing it to test groups.
22+
23+
### Prerequisites
24+
25+
You should be familiar with YAML and the syntax for {% data variables.product.prodname_actions %}. For more information, see:
26+
27+
- "[Learn {% data variables.product.prodname_actions %}](/actions/learn-github-actions)"
28+
- "[Workflow syntax for {% data variables.product.prodname_actions %}](/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions)"
29+
30+
You should have an understanding of Xcode app building and signing. For more information, see the [Apple developer documentation](https://developer.apple.com/documentation/).
31+
32+
### Creating secrets for your certificate and provisioning profile
33+
34+
The signing process involves storing certificates and provisioning profiles, transferring them to the runner, importing them to the runner's keychain, and using them in your build.
35+
36+
To use your certificate and provisioning profile on a runner, we strongly recommend that you use {% data variables.product.prodname_dotcom %} secrets. For more information on creating secrets and using them in a workflow, see "[Encrypted secrets](/actions/reference/encrypted-secrets)."
37+
38+
Create secrets in your repository or organization for the following items:
39+
40+
* Your Apple signing certificate.
41+
42+
- This is your `p12` certificate file. For more information on exporting your signing certificate from Xcode, see the [Xcode documentation](https://help.apple.com/xcode/mac/current/#/dev154b28f09).
43+
44+
- You should convert your certificate to Base64 when saving it as a secret. In this example, the secret is named `BUILD_CERTIFICATE_BASE64`.
45+
46+
- Use the following command to convert your certificate to Base64 and copy it to your clipboard:
47+
48+
```shell
49+
base64 <em>build_certificate</em>.p12 | pbcopy
50+
```
51+
* The password for your Apple signing certificate.
52+
- In this example, the secret is named `P12_PASSWORD`.
53+
54+
* Your Apple provisioning profile.
55+
56+
- For more information on exporting your provisioning profile from Xcode, see the [Xcode documentation](https://help.apple.com/xcode/mac/current/#/deva899b4fe5).
57+
58+
- You should convert your provisioning profile to Base64 when saving it as a secret. In this example, the secret is named `BUILD_PROVISION_PROFILE_BASE64`.
59+
60+
- Use the following command to convert your provisioning profile to Base64 and copy it to your clipboard:
61+
62+
```shell
63+
base64 <em>provisioning_profile.mobileprovision</em> | pbcopy
64+
```
65+
66+
* A keychain password.
67+
68+
- A new keychain will be created on the runner, so the password for the new keychain can be any new random string. In this example, the secret is named `KEYCHAIN_PASSWORD`.
69+
70+
### Add a step to your workflow
71+
72+
This example workflow includes a step that imports the Apple certificate and provisioning profile from the {% data variables.product.prodname_dotcom %} secrets, and installs them on the runner.
73+
74+
{% raw %}
75+
```yaml{:copy}
76+
name: App build
77+
on: push
78+
79+
jobs:
80+
build_with_signing:
81+
runs-on: macos-latest
82+
83+
steps:
84+
- name: Checkout repository
85+
uses: actions/checkout@v2
86+
- name: Install the Apple certificate and provisioning profile
87+
env:
88+
BUILD_CERTIFICATE_BASE64: ${{ secrets.BUILD_CERTIFICATE_BASE64 }}
89+
P12_PASSWORD: ${{ secrets.P12_PASSWORD }}
90+
BUILD_PROVISION_PROFILE_BASE64: ${{ secrets.BUILD_PROVISION_PROFILE_BASE64 }}
91+
KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }}
92+
run: |
93+
# create variables
94+
CERTIFICATE_PATH=$RUNNER_TEMP/build_certificate.p12
95+
PP_PATH=$RUNNER_TEMP/build_pp.mobileprovision
96+
KEYCHAIN_PATH=$RUNNER_TEMP/app-signing.keychain-db
97+
98+
# import certificate and provisioning profile from secrets
99+
echo -n "$BUILD_CERTIFICATE_BASE64" | base64 --decode --output $CERTIFICATE_PATH
100+
echo -n "$BUILD_PROVISION_PROFILE_BASE64" | base64 --decode --output $PP_PATH
101+
102+
# create temporary keychain
103+
security create-keychain -p $KEYCHAIN_PASSWORD $KEYCHAIN_PATH
104+
security set-keychain-settings -lut 21600 $KEYCHAIN_PATH
105+
security unlock-keychain -p $KEYCHAIN_PASSWORD $KEYCHAIN_PATH
106+
107+
# import certificate to keychain
108+
security import $CERTIFICATE_PATH -P $P12_PASSWORD -A -t cert -f pkcs12 -k $KEYCHAIN_PATH
109+
security list-keychain -d user -s $KEYCHAIN_PATH
110+
111+
# apply provisioning profile
112+
mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles
113+
cp $PP_PATH ~/Library/MobileDevice/Provisioning\ Profiles
114+
- name: Build app
115+
...
116+
```
117+
{% endraw %}
118+
119+
### Required clean-up on self-hosted runners
120+
121+
{% data variables.product.prodname_dotcom %}-hosted runners are isolated virtual machines that are automatically destroyed at the end of the job execution. This means that the certificates and provisioning profile used on the runner during the job will be destroyed with the runner when the job is completed.
122+
123+
On self-hosted runners, the `$RUNNER_TEMP` directory is cleaned up at the end of the job execution, but the keychain and provisioning profile might still exist on the runner.
124+
125+
If you use self-hosted runners, you should add a final step to your workflow to help ensure that these sensitive files are deleted at the end of the job. The workflow step shown below is an example of how to do this.
126+
127+
{% raw %}
128+
```yaml
129+
- name: Clean up keychain and provisioning profile
130+
if: ${{ always() }}
131+
run: |
132+
security delete-keychain $RUNNER_TEMP/app-signing.keychain-db
133+
rm ~/Library/MobileDevice/Provisioning\ Profiles/build_pp.mobileprovision
134+
```
135+
{% endraw %}

content/admin/enterprise-management/about-geo-replication.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ Geo DNS, such as [Amazon's Route 53 service](http://docs.aws.amazon.com/Route53/
2222

2323
Writing requests to the replica requires sending the data to the primary and all replicas. This means that the performance of all writes are limited by the slowest replica, although new geo-replicas can seed the majority of their data from existing co-located geo-replicas, rather than from the primary. Geo-replication will not add capacity to a {% data variables.product.prodname_ghe_server %} instance or solve performance issues related to insufficient CPU or memory resources. If the primary appliance is offline, active replicas will be unable to serve any read or write requests.
2424

25+
{% data reusables.enterprise_installation.replica-limit %}
26+
2527
### Monitoring a geo-replication configuration
2628

2729
{% data reusables.enterprise_installation.monitoring-replicas %}

content/admin/enterprise-management/about-high-availability-configuration.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ When you configure high availability, there is an automated setup of one-way, as
1414

1515
{% data variables.product.prodname_ghe_server %} supports an active/passive configuration, where the replica appliance runs as a standby with database services running in replication mode but application services stopped.
1616

17+
{% data reusables.enterprise_installation.replica-limit %}
18+
1719
### Targeted failure scenarios
1820

1921
Use a high availability configuration for protection against:

content/admin/enterprise-management/creating-a-high-availability-replica.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ topics:
1010
- enterprise
1111
---
1212

13+
{% data reusables.enterprise_installation.replica-limit %}
14+
1315
### Creating a high availability replica
1416

1517
1. Set up a new {% data variables.product.prodname_ghe_server %} appliance on your desired platform. The replica appliance should mirror the primary appliance's CPU, RAM, and storage settings. We recommend that you install the replica appliance in an independent environment. The underlying hardware, software, and network components should be isolated from those of the primary appliance. If you are a using a cloud provider, use a separate region or zone. For more information, see ["Setting up a {% data variables.product.prodname_ghe_server %} instance"](/enterprise/{{ currentVersion }}/admin/guides/installation/setting-up-a-github-enterprise-server-instance).

content/admin/user-management/customizing-user-messages-for-your-enterprise.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,21 @@ You can use Markdown to format your message. For more information, see "[About w
6464
{% if currentVersion ver_gt "enterprise-server@2.22" or currentVersion == "github-ae@latest" %}
6565
### Creating a mandatory message
6666

67-
You can create a mandatory message that {% data variables.product.product_name %} will show to all users the first time they sign in after you save the message. The message appears in a pop-up window that the user must dismiss before the user can use {% data variables.product.product_location %}. Mandatory messages have a variety of uses.
67+
You can create a mandatory message that {% data variables.product.product_name %} will show to all users the first time they sign in after you save the message. The message appears in a pop-up window that the user must dismiss before the user can use {% data variables.product.product_location %}.
68+
69+
Mandatory messages have a variety of uses.
6870

6971
- Providing onboarding information for new employees
7072
- Telling users how to get help with {% data variables.product.product_location %}
7173
- Ensuring that all users read your terms of service for using {% data variables.product.product_location %}
7274

75+
{% note %}
76+
77+
**Note:** After you configure a mandatory message for {% data variables.product.product_location %}, you cannot change or remove the message.
78+
79+
{% endnote %}
80+
81+
7382
If you include Markdown checkboxes in the message, all checkboxes must be selected before the user can dismiss the message. For example, if you include your terms of service in the mandatory message, you can require that each user selects a checkbox to confirm the user has read the terms.
7483

7584
Each time a user sees a mandatory message, an audit log event is created. The event includes the version of the message that the user saw. For more information see "[Audited actions](/admin/user-management/audited-actions)."

content/code-security/secure-coding/configuring-code-scanning.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,22 @@ Scanning code when someone pushes a change, and whenever a pull request is creat
5151

5252
By default, the {% data variables.product.prodname_codeql_workflow %} uses the `on.push` event to trigger a code scan on every push to the default branch of the repository and any protected branches. For {% data variables.product.prodname_code_scanning %} to be triggered on a specified branch, the workflow must exist in that branch. For more information, see "[Workflow syntax for {% data variables.product.prodname_actions %}](/actions/reference/workflow-syntax-for-github-actions#on)."
5353

54+
If you scan on push, then the results appear in the **Security** tab for your repository. For more information, see "[Managing code scanning alerts for your repository](/code-security/secure-coding/managing-code-scanning-alerts-for-your-repository#viewing-the-alerts-for-a-repository)."
55+
56+
{% note %}
57+
58+
**Note**: If you want {% data variables.product.prodname_code_scanning %} alerts to appear as pull request checks, you must use the `pull_request` event, described below.
59+
60+
{% endnote %}
61+
5462
#### Scanning pull requests
5563

5664
The default {% data variables.product.prodname_codeql_workflow %} uses the `pull_request` event to trigger a code scan on pull requests targeted against the default branch. {% if currentVersion ver_gt "enterprise-server@2.21" %}The `pull_request` event is not triggered if the pull request was opened from a private fork.{% else %}If a pull request is from a private fork, the `pull_request` event will only be triggered if you've selected the "Run workflows from fork pull requests" option in the repository settings. For more information, see "[Disabling or limiting {% data variables.product.prodname_actions %} for a repository](/github/administering-a-repository/disabling-or-limiting-github-actions-for-a-repository#enabling-workflows-for-private-repository-forks)."{% endif %}
5765

5866
For more information about the `pull_request` event, see "[Workflow syntax for {% data variables.product.prodname_actions %}](/actions/reference/workflow-syntax-for-github-actions#onpushpull_requestbranchestags)."
5967

68+
If you scan pull requests, then the results appear as alerts in a pull request check. For more information, see "[Triaging code scanning alerts in pull requests](/code-security/secure-coding/triaging-code-scanning-alerts-in-pull-requests)."
69+
6070
#### Avoiding unnecessary scans of pull requests
6171

6272
You might want to avoid a code scan being triggered on specific pull requests targeted against the default branch, irrespective of which files have been changed. You can configure this by specifying `on:pull_request:paths-ignore` or `on:pull_request:paths` in the {% data variables.product.prodname_code_scanning %} workflow. For example, if the only changes in a pull request are to files with the file extensions `.md` or `.txt` you can use the following `paths-ignore` array.

content/code-security/security-advisories/adding-a-security-policy-to-your-repository.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ topics:
1414

1515
To give people instructions for responsibly reporting security vulnerabilities in your project, you can add a _SECURITY.md_ file to your repository's root, `docs`, or `.github` folder. When someone creates an issue in your repository, they will see a link to your project's security policy.
1616

17-
You can create a default security policy for your organization or user account. For more information, see "[Creating a default community health file](/github/building-a-strong-community/creating-a-default-community-health-file)."
17+
You can create a default security policy for your organization or user account. For more information, see "[Creating a default community health file](/communities/setting-up-your-project-for-healthy-contributions/creating-a-default-community-health-file)."
1818

1919
{% tip %}
2020

@@ -43,5 +43,5 @@ After someone reports a security vulnerability in your project, you can use {% d
4343
### Further reading
4444

4545
- "[About securing your repository](/github/administering-a-repository/about-securing-your-repository)"
46-
- "[Setting up your project for healthy contributions](/github/building-a-strong-community/setting-up-your-project-for-healthy-contributions)"
46+
- "[Setting up your project for healthy contributions](/communities/setting-up-your-project-for-healthy-contributions)"
4747
- [{% data variables.product.prodname_security %}]({% data variables.product.prodname_security_link %})

content/github/building-a-strong-community/about-wikis.md renamed to content/communities/documenting-your-project-with-wikis/about-wikis.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ intro: 'You can host documentation for your repository in a wiki, so that others
44
redirect_from:
55
- /articles/about-github-wikis/
66
- /articles/about-wikis
7+
- /github/building-a-strong-community/about-wikis
78
product: '{% data reusables.gated-features.wikis %}'
89
versions:
910
free-pro-team: '*'
@@ -19,12 +20,12 @@ With wikis, you can write content just like everywhere else on {% data variables
1920

2021
{% if currentVersion == "free-pro-team@latest" or enterpriseServerVersions contains currentVersion %}If you create a wiki in a public repository, the wiki is available to {% if enterpriseServerVersions contains currentVersion %}anyone with access to {% data variables.product.product_location %}{% else %}the public{% endif %}. {% endif %}If you create a wiki in an internal or private repository, {% if currentVersion == "free-pro-team@latest" or enterpriseServerVersions contains currentVersion %}people{% elsif currentVersion == "github-ae@latest" %}enterprise members{% endif %} with access to the repository can also access the wiki. For more information, see "[Setting repository visibility](/articles/setting-repository-visibility)."
2122

22-
You can edit wikis directly on {% data variables.product.product_name %}, or you can edit wiki files locally. By default, only people with write access to your repository can make changes to wikis, although you can allow everyone on {% data variables.product.product_location %} to contribute to a wiki in {% if currentVersion == "github-ae@latest" %}an internal{% else %}a public{% endif %} repository. For more information, see "[Changing access permissions for wikis](/articles/changing-access-permissions-for-wikis)".
23+
You can edit wikis directly on {% data variables.product.product_name %}, or you can edit wiki files locally. By default, only people with write access to your repository can make changes to wikis, although you can allow everyone on {% data variables.product.product_location %} to contribute to a wiki in {% if currentVersion == "github-ae@latest" %}an internal{% else %}a public{% endif %} repository. For more information, see "[Changing access permissions for wikis](/communities/documenting-your-project-with-wikis/changing-access-permissions-for-wikis)".
2324

2425
### Further reading
2526

26-
- "[Adding or editing wiki pages](/articles/adding-or-editing-wiki-pages)"
27-
- "[Creating a footer or sidebar for your wiki](/articles/creating-a-footer-or-sidebar-for-your-wiki)"
28-
- "[Editing wiki content](/articles/editing-wiki-content)"
27+
- "[Adding or editing wiki pages](/communities/documenting-your-project-with-wikis/adding-or-editing-wiki-pages)"
28+
- "[Creating a footer or sidebar for your wiki](/communities/documenting-your-project-with-wikis/creating-a-footer-or-sidebar-for-your-wiki)"
29+
- "[Editing wiki content](/communities/documenting-your-project-with-wikis/editing-wiki-content)"
2930
- "[Viewing a wiki's history of changes](/articles/viewing-a-wiki-s-history-of-changes)"
3031
- "[Searching wikis](/articles/searching-wikis)"

content/github/building-a-strong-community/adding-or-editing-wiki-pages.md renamed to content/communities/documenting-your-project-with-wikis/adding-or-editing-wiki-pages.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ redirect_from:
77
- /articles/adding-and-editing-wik-pages-locally/
88
- /articles/adding-and-editing-wiki-pages-locally/
99
- /articles/adding-or-editing-wiki-pages
10+
- /github/building-a-strong-community/adding-or-editing-wiki-pages
1011
product: '{% data reusables.gated-features.wikis %}'
1112
versions:
1213
free-pro-team: '*'

0 commit comments

Comments
 (0)