Merge branch 'main' into patch-1
1
.eslintignore
Normal file
@@ -0,0 +1 @@
|
|||||||
|
dist/
|
||||||
28
.eslintrc.js
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
module.exports = {
|
||||||
|
env: {
|
||||||
|
browser: true,
|
||||||
|
commonjs: true,
|
||||||
|
es2020: true,
|
||||||
|
node: true
|
||||||
|
},
|
||||||
|
parser: 'babel-eslint',
|
||||||
|
extends: [
|
||||||
|
'eslint:recommended',
|
||||||
|
'standard'
|
||||||
|
],
|
||||||
|
parserOptions: {
|
||||||
|
ecmaVersion: 11
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
},
|
||||||
|
overrides: [
|
||||||
|
{
|
||||||
|
files: [
|
||||||
|
'**/tests/**/*.js'
|
||||||
|
],
|
||||||
|
env: {
|
||||||
|
jest: true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
2
.github/PULL_REQUEST_TEMPLATE.md
vendored
@@ -22,6 +22,6 @@ Thanks again!
|
|||||||
|
|
||||||
### Check off the following:
|
### Check off the following:
|
||||||
- [ ] All of the tests are passing.
|
- [ ] All of the tests are passing.
|
||||||
- [ ] I have reviewed my changes in staging.
|
- [ ] I have reviewed my changes in staging. (look for the **deploy-to-heroku** link in your pull request, then click **View deployment**)
|
||||||
- [ ] For content changes, I have reviewed the [localization checklist](https://github.com/github/docs/blob/main/contributing/localization-checklist.md)
|
- [ ] For content changes, I have reviewed the [localization checklist](https://github.com/github/docs/blob/main/contributing/localization-checklist.md)
|
||||||
- [ ] For content changes, I have reviewed the [Content style guide for GitHub Docs](https://github.com/github/docs/blob/main/contributing/content-style-guide.md).
|
- [ ] For content changes, I have reviewed the [Content style guide for GitHub Docs](https://github.com/github/docs/blob/main/contributing/content-style-guide.md).
|
||||||
|
|||||||
36
.github/actions-scripts/enterprise-algolia-label.js
vendored
Executable file
@@ -0,0 +1,36 @@
|
|||||||
|
#!/usr/bin/env node
|
||||||
|
|
||||||
|
const fs = require('fs')
|
||||||
|
const core = require('@actions/core')
|
||||||
|
const eventPayload = JSON.parse(fs.readFileSync(process.env.GITHUB_EVENT_PATH, 'utf8'))
|
||||||
|
|
||||||
|
// This workflow-run script does the following:
|
||||||
|
// 1. Gets an array of labels on a PR.
|
||||||
|
// 2. Finds one with the relevant Algolia text; if none found, exits early.
|
||||||
|
// 3. Gets the version substring from the label string.
|
||||||
|
|
||||||
|
const labelText = 'sync-english-index-for-'
|
||||||
|
const labelsArray = eventPayload.pull_request.labels
|
||||||
|
|
||||||
|
// Exit early if no labels are on this PR
|
||||||
|
if (!(labelsArray && labelsArray.length)) {
|
||||||
|
process.exit(0)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Find the relevant label
|
||||||
|
const algoliaLabel = labelsArray
|
||||||
|
.map(label => label.name)
|
||||||
|
.find(label => label.startsWith(labelText))
|
||||||
|
|
||||||
|
// Exit early if no relevant label is found
|
||||||
|
if (!algoliaLabel) {
|
||||||
|
process.exit(0)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Given: sync-english-index-for-enterprise-server@3.0
|
||||||
|
// Returns: enterprise-server@3.0
|
||||||
|
const versionToSync = algoliaLabel.split(labelText)[1]
|
||||||
|
|
||||||
|
// Store the version so we can access it later in the workflow
|
||||||
|
core.setOutput('versionToSync', versionToSync)
|
||||||
|
process.exit(0)
|
||||||
41
.github/actions-scripts/openapi-schema-branch.js
vendored
Executable file
@@ -0,0 +1,41 @@
|
|||||||
|
#!/usr/bin/env node
|
||||||
|
|
||||||
|
const fs = require('fs')
|
||||||
|
const path = require('path')
|
||||||
|
const { execSync } = require('child_process')
|
||||||
|
const semver = require('semver')
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This script performs two checks to prevent shipping development mode OpenAPI schemas:
|
||||||
|
* - Ensures the `info.version` property is a semantic version.
|
||||||
|
* In development mode, the `info.version` property is a string
|
||||||
|
* containing the `github/github` branch name.
|
||||||
|
* - Ensures the decorated schema matches the dereferenced schema.
|
||||||
|
* The workflow that calls this script runs `script/rest/update-files.js`
|
||||||
|
* with the `--decorate-only` switch then checks to see if files changed.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Check that the `info.version` property is a semantic version
|
||||||
|
const dereferencedDir = path.join(process.cwd(), 'lib/rest/static/dereferenced')
|
||||||
|
const schemas = fs.readdirSync(dereferencedDir)
|
||||||
|
schemas.forEach(filename => {
|
||||||
|
const schema = require(path.join(dereferencedDir, filename))
|
||||||
|
if (!semver.valid(schema.info.version)) {
|
||||||
|
console.log(`🚧⚠️ Your branch contains a development mode OpenAPI schema: ${schema.info.version}. This check is a reminder to not 🚢 OpenAPI files in development mode. 🛑`)
|
||||||
|
process.exit(1)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
// Check that the decorated schema matches the dereferenced schema
|
||||||
|
const changedFiles = execSync('git diff --name-only HEAD').toString()
|
||||||
|
|
||||||
|
if(changedFiles !== '') {
|
||||||
|
console.log(`These files were changed:\n${changedFiles}`)
|
||||||
|
console.log(`🚧⚠️ Your decorated and dereferenced schema files don't match. Ensure you're using decorated and dereferenced schemas from the automatically created pull requests by the 'github-openapi-bot' user. For more information, see 'script/rest/README.md'. 🛑`)
|
||||||
|
process.exit(1)
|
||||||
|
}
|
||||||
|
|
||||||
|
// All checks pass, ready to ship
|
||||||
|
console.log('All good 👍')
|
||||||
|
process.exit(0)
|
||||||
7
.github/allowed-actions.js
vendored
@@ -21,13 +21,16 @@ module.exports = [
|
|||||||
'juliangruber/approve-pull-request-action@c530832d4d346c597332e20e03605aa94fa150a8',
|
'juliangruber/approve-pull-request-action@c530832d4d346c597332e20e03605aa94fa150a8',
|
||||||
'juliangruber/find-pull-request-action@64d55773c959748ad30a4184f4dc102af1669f7b',
|
'juliangruber/find-pull-request-action@64d55773c959748ad30a4184f4dc102af1669f7b',
|
||||||
'juliangruber/read-file-action@e0a316da496006ffd19142f0fd594a1783f3b512',
|
'juliangruber/read-file-action@e0a316da496006ffd19142f0fd594a1783f3b512',
|
||||||
|
'lee-dohm/close-matching-issues@22002609b2555fe18f52b8e2e7c07cbf5529e8a8',
|
||||||
'pascalgn/automerge-action@c9bd182',
|
'pascalgn/automerge-action@c9bd182',
|
||||||
'peter-evans/create-issue-from-file@35e304e2a12caac08c568247a2cb46ecd0c3ecc5',
|
'peter-evans/create-issue-from-file@a04ce672e3acedb1f8e416b46716ddfd09905326',
|
||||||
|
'peter-evans/create-or-update-comment@5221bf4aa615e5c6e95bb142f9673a9c791be2cd',
|
||||||
'peter-evans/create-pull-request@938e6aea6f8dbdaced2064e948cb806c77fe87b8',
|
'peter-evans/create-pull-request@938e6aea6f8dbdaced2064e948cb806c77fe87b8',
|
||||||
'rachmari/actions-add-new-issue-to-column@1a459ef92308ba7c9c9dc2fcdd72f232495574a9',
|
'rachmari/actions-add-new-issue-to-column@1a459ef92308ba7c9c9dc2fcdd72f232495574a9',
|
||||||
'rachmari/labeler@832d42ec5523f3c6d46e8168de71cd54363e3e2e',
|
'rachmari/labeler@832d42ec5523f3c6d46e8168de71cd54363e3e2e',
|
||||||
'repo-sync/github-sync@3832fe8e2be32372e1b3970bbae8e7079edeec88',
|
'repo-sync/github-sync@3832fe8e2be32372e1b3970bbae8e7079edeec88',
|
||||||
'repo-sync/pull-request@33777245b1aace1a58c87a29c90321aa7a74bd7d',
|
'repo-sync/pull-request@33777245b1aace1a58c87a29c90321aa7a74bd7d',
|
||||||
'rtCamp/action-slack-notify@e17352feaf9aee300bf0ebc1dfbf467d80438815',
|
'rtCamp/action-slack-notify@e17352feaf9aee300bf0ebc1dfbf467d80438815',
|
||||||
'tjenkinson/gh-action-auto-merge-dependency-updates@cee2ac0'
|
'tjenkinson/gh-action-auto-merge-dependency-updates@cee2ac0',
|
||||||
|
'EndBug/add-and-commit@9358097a71ad9fb9e2f9624c6098c89193d83575'
|
||||||
]
|
]
|
||||||
|
|||||||
5
.github/workflows/60-days-stale-check.yml
vendored
@@ -1,7 +1,7 @@
|
|||||||
name: 60 Days Stale Check
|
name: 60 Days Stale Check
|
||||||
on:
|
on:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: "40 16 * * *" # Run each day at 16:40 UTC / 8:40 PST
|
- cron: '40 16 * * *' # Run each day at 16:40 UTC / 8:40 PST
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
stale:
|
stale:
|
||||||
@@ -17,4 +17,5 @@ jobs:
|
|||||||
only-labels: 'engineering'
|
only-labels: 'engineering'
|
||||||
stale-issue-label: 'stale'
|
stale-issue-label: 'stale'
|
||||||
stale-pr-label: 'stale'
|
stale-pr-label: 'stale'
|
||||||
|
exempt-pr-labels: 'never-stale'
|
||||||
|
exempt-issue-labels: 'never-stale'
|
||||||
|
|||||||
4
.github/workflows/auto-label-prs.yml
vendored
@@ -1,6 +1,6 @@
|
|||||||
name: Auto label Pull Requests
|
name: Auto label Pull Requests
|
||||||
on:
|
on:
|
||||||
- pull_request
|
pull_request:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
triage:
|
triage:
|
||||||
@@ -9,4 +9,4 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/labeler@5f867a63be70efff62b767459b009290364495eb
|
- uses: actions/labeler@5f867a63be70efff62b767459b009290364495eb
|
||||||
with:
|
with:
|
||||||
repo-token: "${{ secrets.GITHUB_TOKEN }}"
|
repo-token: '${{ secrets.GITHUB_TOKEN }}'
|
||||||
|
|||||||
8
.github/workflows/automerge-dependencies.yml
vendored
@@ -3,10 +3,10 @@ name: Auto Merge Dependency Updates
|
|||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
paths:
|
paths:
|
||||||
- "package*.json"
|
- 'package*.json'
|
||||||
- "Gemfile*"
|
- 'Gemfile*'
|
||||||
- "Dockerfile"
|
- 'Dockerfile'
|
||||||
- ".github/workflows/**"
|
- '.github/workflows/**'
|
||||||
pull_request_review:
|
pull_request_review:
|
||||||
types:
|
types:
|
||||||
- edited
|
- edited
|
||||||
|
|||||||
20
.github/workflows/automerge.yml
vendored
@@ -23,14 +23,14 @@ jobs:
|
|||||||
if: contains(github.event.pull_request.labels.*.name, 'automerge') || contains(github.event.pull_request.labels.*.name, 'autosquash')
|
if: contains(github.event.pull_request.labels.*.name, 'automerge') || contains(github.event.pull_request.labels.*.name, 'autosquash')
|
||||||
steps:
|
steps:
|
||||||
- name: automerge
|
- name: automerge
|
||||||
uses: "pascalgn/automerge-action@c9bd182"
|
uses: 'pascalgn/automerge-action@c9bd182'
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: "${{ secrets.OCTOMERGER_PAT_WITH_REPO_AND_WORKFLOW_SCOPE }}"
|
GITHUB_TOKEN: '${{ secrets.OCTOMERGER_PAT_WITH_REPO_AND_WORKFLOW_SCOPE }}'
|
||||||
MERGE_METHOD_LABELS: "automerge=merge,autosquash=squash"
|
MERGE_METHOD_LABELS: 'automerge=merge,autosquash=squash'
|
||||||
MERGE_COMMIT_MESSAGE: "pull-request-title"
|
MERGE_COMMIT_MESSAGE: 'pull-request-title'
|
||||||
MERGE_METHOD: "merge"
|
MERGE_METHOD: 'merge'
|
||||||
MERGE_FORKS: "true"
|
MERGE_FORKS: 'true'
|
||||||
MERGE_RETRIES: "50"
|
MERGE_RETRIES: '50'
|
||||||
MERGE_RETRY_SLEEP: "10000" # ten seconds
|
MERGE_RETRY_SLEEP: '10000' # ten seconds
|
||||||
UPDATE_LABELS: "automerge,autosquash"
|
UPDATE_LABELS: 'automerge,autosquash'
|
||||||
UPDATE_METHOD: "merge"
|
UPDATE_METHOD: 'merge'
|
||||||
|
|||||||
12
.github/workflows/browser-test.yml
vendored
@@ -20,18 +20,22 @@ jobs:
|
|||||||
paths: '[".github/workflows/browser-test.yml","assets/**", "content/**", "data/**", "includes/**", "javascripts/**", "jest-puppeteer.config.js", "jest.config.js", "layouts/**", "lib/**", "middleware/**", "package-lock.json", "package.json", "server.js", "translations/**", "webpack.config.js"]'
|
paths: '[".github/workflows/browser-test.yml","assets/**", "content/**", "data/**", "includes/**", "javascripts/**", "jest-puppeteer.config.js", "jest.config.js", "layouts/**", "lib/**", "middleware/**", "package-lock.json", "package.json", "server.js", "translations/**", "webpack.config.js"]'
|
||||||
build:
|
build:
|
||||||
needs: see_if_should_skip
|
needs: see_if_should_skip
|
||||||
if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
# Each of these ifs needs to be repeated at each step to make sure the required check still runs
|
||||||
|
# Even if if doesn't do anything
|
||||||
|
- if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
|
||||||
|
name: Checkout
|
||||||
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
|
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
|
||||||
|
|
||||||
- name: Install
|
- if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
|
||||||
|
name: Install
|
||||||
uses: ianwalter/puppeteer@12728ddef82390d1ecd4732fb543f62177392fbb
|
uses: ianwalter/puppeteer@12728ddef82390d1ecd4732fb543f62177392fbb
|
||||||
with:
|
with:
|
||||||
args: npm ci
|
args: npm ci
|
||||||
|
|
||||||
- name: Test
|
- if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
|
||||||
|
name: Test
|
||||||
uses: ianwalter/puppeteer@12728ddef82390d1ecd4732fb543f62177392fbb
|
uses: ianwalter/puppeteer@12728ddef82390d1ecd4732fb543f62177392fbb
|
||||||
with:
|
with:
|
||||||
args: npm run browser-test
|
args: npm run browser-test
|
||||||
|
|||||||
36
.github/workflows/check-all-english-links.yml
vendored
@@ -1,8 +1,9 @@
|
|||||||
name: Check all English links
|
name: Check all English links
|
||||||
|
|
||||||
on:
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: "40 19 * * *" # once a day at 19:40 UTC / 11:40 PST
|
- cron: '40 19 * * *' # once a day at 19:40 UTC / 11:40 PST
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
check_all_english_links:
|
check_all_english_links:
|
||||||
@@ -16,21 +17,32 @@ jobs:
|
|||||||
- name: npm run build
|
- name: npm run build
|
||||||
run: npm run build
|
run: npm run build
|
||||||
- name: Run script
|
- name: Run script
|
||||||
run: script/check-external-links en > broken_links.md
|
|
||||||
- name: Check if any broken links
|
|
||||||
id: check
|
|
||||||
run: |
|
run: |
|
||||||
if [ "$(grep 'All links are good' broken_links.md)" ]; then
|
script/check-english-links.js > broken_links.md
|
||||||
echo ::set-output name=continue::no
|
- if: ${{ failure() }}
|
||||||
else
|
name: Get title for issue
|
||||||
echo "::set-output name=continue::yes"
|
id: check
|
||||||
echo "::set-output name=title::$(grep 'found on help.github.com' broken_links.md)"
|
run: echo "::set-output name=title::$(head -1 broken_links.md)"
|
||||||
fi
|
- if: ${{ failure() }}
|
||||||
- if: ${{ steps.check.outputs.continue == 'yes' }}
|
name: Close previous report
|
||||||
|
uses: lee-dohm/close-matching-issues@22002609b2555fe18f52b8e2e7c07cbf5529e8a8
|
||||||
|
with:
|
||||||
|
query: 'label:"broken link report"'
|
||||||
|
token: ${{ secrets.DOCUBOT_FR_PROJECT_BOARD_WORKFLOWS_REPO_ORG_READ_SCOPES }}
|
||||||
|
- if: ${{ failure() }}
|
||||||
name: Create issue from file
|
name: Create issue from file
|
||||||
uses: peter-evans/create-issue-from-file@35e304e2a12caac08c568247a2cb46ecd0c3ecc5
|
id: broken-link-report
|
||||||
|
uses: peter-evans/create-issue-from-file@a04ce672e3acedb1f8e416b46716ddfd09905326
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.DOCUBOT_FR_PROJECT_BOARD_WORKFLOWS_REPO_ORG_READ_SCOPES }}
|
token: ${{ secrets.DOCUBOT_FR_PROJECT_BOARD_WORKFLOWS_REPO_ORG_READ_SCOPES }}
|
||||||
title: ${{ steps.check.outputs.title }}
|
title: ${{ steps.check.outputs.title }}
|
||||||
content-filepath: ./broken_links.md
|
content-filepath: ./broken_links.md
|
||||||
labels: broken link report
|
labels: broken link report
|
||||||
|
- if: ${{ failure() }}
|
||||||
|
name: Add comment to issue
|
||||||
|
uses: peter-evans/create-or-update-comment@5221bf4aa615e5c6e95bb142f9673a9c791be2cd
|
||||||
|
with:
|
||||||
|
body: |
|
||||||
|
cc @github/docs-content
|
||||||
|
issue-number: ${{ steps.broken-link-report.outputs.issue-number }}
|
||||||
|
token: ${{ secrets.DOCUBOT_FR_PROJECT_BOARD_WORKFLOWS_REPO_ORG_READ_SCOPES }}
|
||||||
|
|||||||
2
.github/workflows/codeql.yml
vendored
@@ -1,4 +1,4 @@
|
|||||||
name: "CodeQL analysis"
|
name: CodeQL analysis
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
|
|||||||
4
.github/workflows/crowdin.yml
vendored
@@ -3,7 +3,7 @@ name: Crowdin Sync
|
|||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: "33 2 * * *" # every day at 2:33 UTC at least until automerge is working
|
- cron: '33 2 * * *' # every day at 2:33 UTC at least until automerge is working
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
sync_with_crowdin:
|
sync_with_crowdin:
|
||||||
@@ -47,5 +47,3 @@ jobs:
|
|||||||
# See https://crowdin.com/settings#api-key to generate a token
|
# See https://crowdin.com/settings#api-key to generate a token
|
||||||
# This token was created by logging into Crowdin with the octoglot user
|
# This token was created by logging into Crowdin with the octoglot user
|
||||||
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
|
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,12 @@
|
|||||||
name: First responder docs-content
|
name: First responder docs-content
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
types: [reopened, opened, ready_for_review, closed, unlabeled]
|
types:
|
||||||
|
- reopened
|
||||||
|
- opened
|
||||||
|
- ready_for_review
|
||||||
|
- closed
|
||||||
|
- unlabeled
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
first-responder-triage-pr:
|
first-responder-triage-pr:
|
||||||
@@ -41,15 +46,15 @@ jobs:
|
|||||||
uses: rachmari/labeler@832d42ec5523f3c6d46e8168de71cd54363e3e2e
|
uses: rachmari/labeler@832d42ec5523f3c6d46e8168de71cd54363e3e2e
|
||||||
if: steps.set-result.outputs.result == 'false'
|
if: steps.set-result.outputs.result == 'false'
|
||||||
with:
|
with:
|
||||||
repo-token: "${{ secrets.DOCUBOT_FR_PROJECT_BOARD_WORKFLOWS_REPO_ORG_READ_SCOPES }}"
|
repo-token: '${{ secrets.DOCUBOT_FR_PROJECT_BOARD_WORKFLOWS_REPO_ORG_READ_SCOPES }}'
|
||||||
add-labels: "docs-content-fr"
|
add-labels: 'docs-content-fr'
|
||||||
- name: Triage to FR PR project column
|
- name: Triage to FR PR project column
|
||||||
uses: rachmari/actions-add-new-issue-to-column@1a459ef92308ba7c9c9dc2fcdd72f232495574a9
|
uses: rachmari/actions-add-new-issue-to-column@1a459ef92308ba7c9c9dc2fcdd72f232495574a9
|
||||||
if: steps.set-result.outputs.result == 'false'
|
if: steps.set-result.outputs.result == 'false'
|
||||||
with:
|
with:
|
||||||
action-token: ${{ secrets.DOCUBOT_FR_PROJECT_BOARD_WORKFLOWS_REPO_ORG_READ_SCOPES }}
|
action-token: ${{ secrets.DOCUBOT_FR_PROJECT_BOARD_WORKFLOWS_REPO_ORG_READ_SCOPES }}
|
||||||
project-url: "https://github.com/orgs/github/projects/1367"
|
project-url: 'https://github.com/orgs/github/projects/1367'
|
||||||
column-name: "Docs-internal external contributor PRs"
|
column-name: 'Docs-internal external contributor PRs'
|
||||||
|
|
||||||
first-responder-remove-pr:
|
first-responder-remove-pr:
|
||||||
name: Remove PR from FR project board
|
name: Remove PR from FR project board
|
||||||
@@ -81,5 +86,5 @@ jobs:
|
|||||||
if: github.event.action == 'closed'
|
if: github.event.action == 'closed'
|
||||||
uses: rachmari/labeler@832d42ec5523f3c6d46e8168de71cd54363e3e2e
|
uses: rachmari/labeler@832d42ec5523f3c6d46e8168de71cd54363e3e2e
|
||||||
with:
|
with:
|
||||||
repo-token: "${{ secrets.DOCUBOT_FR_PROJECT_BOARD_WORKFLOWS_REPO_ORG_READ_SCOPES }}"
|
repo-token: '${{ secrets.DOCUBOT_FR_PROJECT_BOARD_WORKFLOWS_REPO_ORG_READ_SCOPES }}'
|
||||||
remove-labels: "docs-content-fr"
|
remove-labels: 'docs-content-fr'
|
||||||
|
|||||||
4
.github/workflows/js-lint.yml
vendored
@@ -21,7 +21,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
cancel_others: 'false'
|
cancel_others: 'false'
|
||||||
github_token: ${{ github.token }}
|
github_token: ${{ github.token }}
|
||||||
paths: '["**/*.js", "package*.json", ".github/workflows/js-lint.yml"]'
|
paths: '["**/*.js", "package*.json", ".github/workflows/js-lint.yml", ".eslint*"]'
|
||||||
|
|
||||||
lint:
|
lint:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@@ -53,7 +53,7 @@ jobs:
|
|||||||
run: npm ci
|
run: npm ci
|
||||||
|
|
||||||
- name: Run linter
|
- name: Run linter
|
||||||
run: npx standard
|
run: npx eslint .
|
||||||
|
|
||||||
- name: Check dependencies
|
- name: Check dependencies
|
||||||
run: npm run check-deps
|
run: npm run check-deps
|
||||||
|
|||||||
3
.github/workflows/merged-notification.yml
vendored
@@ -1,7 +1,8 @@
|
|||||||
name: Merged notification
|
name: Merged notification
|
||||||
on:
|
on:
|
||||||
pull_request_target:
|
pull_request_target:
|
||||||
types: ['closed']
|
types:
|
||||||
|
- 'closed'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
comment:
|
comment:
|
||||||
|
|||||||
32
.github/workflows/openapi-decorate.yml
vendored
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
name: OpenAPI generate decorated schema files
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
pull_request:
|
||||||
|
types: [opened]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
generate-decorated-files:
|
||||||
|
if: github.event.pull_request.user.login == 'github-openapi-bot'
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository code
|
||||||
|
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: npm ci
|
||||||
|
|
||||||
|
- name: Decorate the dereferenced OpenAPI schemas
|
||||||
|
run: script/rest/update-files.js --decorate-only
|
||||||
|
|
||||||
|
- name: Check in the decorated files
|
||||||
|
uses: EndBug/add-and-commit@9358097a71ad9fb9e2f9624c6098c89193d83575
|
||||||
|
with:
|
||||||
|
# The arguments for the `git add` command
|
||||||
|
add: 'lib/rest/static/decorated'
|
||||||
|
|
||||||
|
# The message for the commit
|
||||||
|
message: 'Add decorated OpenAPI schema files'
|
||||||
|
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Leave this line unchanged
|
||||||
22
.github/workflows/openapi-schema-check.yml
vendored
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
name: OpenAPI dev mode check
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
push:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
check-schema-versions:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository code
|
||||||
|
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: npm ci
|
||||||
|
|
||||||
|
# Differences between decorated and dereferenced files indicates a problem
|
||||||
|
- name: Generate decorated files to check that there are no differences
|
||||||
|
run: script/rest/update-files.js --decorate-only
|
||||||
|
|
||||||
|
- name: Check if deref/decorated schemas are dev mode and that they match
|
||||||
|
run: .github/actions-scripts/openapi-schema-branch.js
|
||||||
4
.github/workflows/pa11y.yml
vendored
@@ -1,8 +1,8 @@
|
|||||||
name: "Pa11y"
|
name: Pa11y
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: "25 17 * * *" # once a day at 17:25 UTC / 11:50 PST
|
- cron: '25 17 * * *' # once a day at 17:25 UTC / 11:50 PST
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|||||||
2
.github/workflows/ping-staging-apps.yml
vendored
@@ -2,7 +2,7 @@ name: Ping staging apps
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: "*/20 * * * *" # every twenty minutes
|
- cron: '*/20 * * * *' # every twenty minutes
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
ping_staging_apps:
|
ping_staging_apps:
|
||||||
|
|||||||
5
.github/workflows/remove-unused-assets.yml
vendored
@@ -5,7 +5,7 @@ env:
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: "20 15 * * 0" # run every Sunday at 20:15 UTC / 12:15 PST
|
- cron: '20 15 * * 0' # run every Sunday at 20:15 UTC / 12:15 PST
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
remove_unused_assets:
|
remove_unused_assets:
|
||||||
@@ -39,7 +39,8 @@ jobs:
|
|||||||
token: ${{ secrets.OCTOMERGER_PAT_WITH_REPO_AND_WORKFLOW_SCOPE }}
|
token: ${{ secrets.OCTOMERGER_PAT_WITH_REPO_AND_WORKFLOW_SCOPE }}
|
||||||
commit-message: Action ran script/remove-unused-assets.js
|
commit-message: Action ran script/remove-unused-assets.js
|
||||||
title: Remove unused assets
|
title: Remove unused assets
|
||||||
body: "Hello! This PR removes some files that exist in the repo but are not used in content or data files:\n\n
|
body:
|
||||||
|
"Hello! This PR removes some files that exist in the repo but are not used in content or data files:\n\n
|
||||||
${{ steps.results.outputs.content }}
|
${{ steps.results.outputs.content }}
|
||||||
\n\nIf you have any questions, please contact @github/docs-engineering."
|
\n\nIf you have any questions, please contact @github/docs-engineering."
|
||||||
labels: unused assets
|
labels: unused assets
|
||||||
|
|||||||
26
.github/workflows/repo-freeze-check.yml
vendored
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
name: Repo Freeze Check
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
types:
|
||||||
|
- opened
|
||||||
|
- reopened
|
||||||
|
- synchronize
|
||||||
|
- ready_for_review
|
||||||
|
- unlocked
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
|
env:
|
||||||
|
FREEZE: ${{ secrets.FREEZE }}
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
check-freezer:
|
||||||
|
name: Prevent merging during deployment freezes
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Fail if repo merges are paused
|
||||||
|
if: ${{ env.FREEZE == 'true' }}
|
||||||
|
run: |
|
||||||
|
echo 'Merges into the "main" branch on this repo are currently paused!'
|
||||||
|
exit 1
|
||||||
3
.github/workflows/repo-freeze-reminders.yml
vendored
@@ -2,7 +2,7 @@ name: Repo Freeze Reminders
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: "00 11 * * *" # once per day around 11:00am UTC
|
- cron: '00 11 * * *' # once per day around 11:00am UTC
|
||||||
|
|
||||||
env:
|
env:
|
||||||
FREEZE: ${{ secrets.FREEZE }}
|
FREEZE: ${{ secrets.FREEZE }}
|
||||||
@@ -13,7 +13,6 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: github.repository == 'github/docs-internal'
|
if: github.repository == 'github/docs-internal'
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
- name: Send Slack notification if repo is frozen
|
- name: Send Slack notification if repo is frozen
|
||||||
if: ${{ env.FREEZE == 'true' }}
|
if: ${{ env.FREEZE == 'true' }}
|
||||||
uses: rtCamp/action-slack-notify@e17352feaf9aee300bf0ebc1dfbf467d80438815
|
uses: rtCamp/action-slack-notify@e17352feaf9aee300bf0ebc1dfbf467d80438815
|
||||||
|
|||||||
6
.github/workflows/repo-sync.yml
vendored
@@ -8,7 +8,7 @@ name: Repo Sync
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: "*/15 * * * *" # every 15 minutes
|
- cron: '*/15 * * * *' # every 15 minutes
|
||||||
|
|
||||||
env:
|
env:
|
||||||
FREEZE: ${{ secrets.FREEZE }}
|
FREEZE: ${{ secrets.FREEZE }}
|
||||||
@@ -18,7 +18,6 @@ jobs:
|
|||||||
name: Check for deployment freezes
|
name: Check for deployment freezes
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
- name: Exit if repo is frozen
|
- name: Exit if repo is frozen
|
||||||
if: ${{ env.FREEZE == 'true' }}
|
if: ${{ env.FREEZE == 'true' }}
|
||||||
run: |
|
run: |
|
||||||
@@ -30,7 +29,6 @@ jobs:
|
|||||||
needs: check-freezer
|
needs: check-freezer
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
- name: Check out repo
|
- name: Check out repo
|
||||||
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
|
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
|
||||||
|
|
||||||
@@ -51,7 +49,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
source_branch: repo-sync
|
source_branch: repo-sync
|
||||||
destination_branch: main
|
destination_branch: main
|
||||||
pr_title: "repo sync"
|
pr_title: 'repo sync'
|
||||||
pr_body: "This is an automated pull request to sync changes between the public and private repos.\n\n:robot: This pull request should be merged (not squashed) to preserve continuity across repos, so please let a bot do the merging!"
|
pr_body: "This is an automated pull request to sync changes between the public and private repos.\n\n:robot: This pull request should be merged (not squashed) to preserve continuity across repos, so please let a bot do the merging!"
|
||||||
pr_label: automerge,autoupdate
|
pr_label: automerge,autoupdate
|
||||||
github_token: ${{ secrets.OCTOMERGER_PAT_WITH_REPO_AND_WORKFLOW_SCOPE }}
|
github_token: ${{ secrets.OCTOMERGER_PAT_WITH_REPO_AND_WORKFLOW_SCOPE }}
|
||||||
|
|||||||
@@ -2,7 +2,9 @@ name: Send Issue to EPD backlog
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
issues:
|
issues:
|
||||||
types: [labeled, reopened]
|
types:
|
||||||
|
- labeled
|
||||||
|
- reopened
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
triage:
|
triage:
|
||||||
|
|||||||
@@ -2,7 +2,9 @@ name: Start new engineering PR workflow
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request_target:
|
pull_request_target:
|
||||||
types: [opened, reopened]
|
types:
|
||||||
|
- opened
|
||||||
|
- reopened
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
triage:
|
triage:
|
||||||
|
|||||||
46
.github/workflows/sync-single-english-algolia-index.yml
vendored
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
name: Algolia Sync Single English Index
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
types:
|
||||||
|
- labeled
|
||||||
|
- unlabeled
|
||||||
|
- opened
|
||||||
|
- reopened
|
||||||
|
- synchronize
|
||||||
|
- ready_for_review
|
||||||
|
- unlocked
|
||||||
|
|
||||||
|
# This workflow requires a label in the format `sync-english-index-for-<PLAN@RELEASE>`
|
||||||
|
jobs:
|
||||||
|
updateIndices:
|
||||||
|
name: Update English index for single version based on a label's version
|
||||||
|
if: github.repository == 'github/docs-internal'
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: checkout
|
||||||
|
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
|
||||||
|
- uses: actions/setup-node@56899e050abffc08c2b3b61f3ec6a79a9dc3223d
|
||||||
|
with:
|
||||||
|
node-version: 14.x
|
||||||
|
- name: cache node modules
|
||||||
|
uses: actions/cache@0781355a23dac32fd3bac414512f4b903437991a
|
||||||
|
with:
|
||||||
|
path: ~/.npm
|
||||||
|
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-node-
|
||||||
|
- name: npm ci
|
||||||
|
run: npm ci
|
||||||
|
- name: Get version from Algolia label if present; only continue if the label is found.
|
||||||
|
id: getVersion
|
||||||
|
run: $GITHUB_WORKSPACE/.github/actions-scripts/enterprise-algolia-label.js
|
||||||
|
- if: ${{ steps.getVersion.outputs.versionToSync }}
|
||||||
|
name: Sync English index for single version
|
||||||
|
env:
|
||||||
|
VERSION: ${{ steps.getVersion.outputs.versionToSync }}
|
||||||
|
LANGUAGE: 'en'
|
||||||
|
ALGOLIA_APPLICATION_ID: ${{ secrets.ALGOLIA_APPLICATION_ID }}
|
||||||
|
ALGOLIA_API_KEY: ${{ secrets.ALGOLIA_API_KEY }}
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
run: npm run sync-search
|
||||||
6
.github/workflows/test-translations.yml
vendored
@@ -4,7 +4,7 @@ name: Node.js Tests - Translations
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: "10 20 * * *" # once a day at 20:10 UTC / 12:10 PST
|
- cron: '10 20 * * *' # once a day at 20:10 UTC / 12:10 PST
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
lint:
|
lint:
|
||||||
@@ -38,7 +38,7 @@ jobs:
|
|||||||
run: npm ci
|
run: npm ci
|
||||||
|
|
||||||
- name: Run linter
|
- name: Run linter
|
||||||
run: npx standard
|
run: npx eslint .
|
||||||
|
|
||||||
- name: Check dependencies
|
- name: Check dependencies
|
||||||
run: npm run check-deps
|
run: npm run check-deps
|
||||||
@@ -78,4 +78,4 @@ jobs:
|
|||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: npx jest tests/${{ matrix.test-group }}/
|
run: npx jest tests/${{ matrix.test-group }}/
|
||||||
env:
|
env:
|
||||||
NODE_OPTIONS: "--max_old_space_size=4096"
|
NODE_OPTIONS: '--max_old_space_size=4096'
|
||||||
|
|||||||
7
.github/workflows/test-windows.yml
vendored
@@ -5,10 +5,7 @@ name: Node.js Tests - Windows
|
|||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: "50 19 * * *" # once a day at 19:50 UTC / 11:50 PST
|
- cron: '50 19 * * *' # once a day at 19:50 UTC / 11:50 PST
|
||||||
|
|
||||||
env:
|
|
||||||
CI: true
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
@@ -48,4 +45,4 @@ jobs:
|
|||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: npx jest tests/${{ matrix.test-group }}/
|
run: npx jest tests/${{ matrix.test-group }}/
|
||||||
env:
|
env:
|
||||||
NODE_OPTIONS: "--max_old_space_size=4096"
|
NODE_OPTIONS: '--max_old_space_size=4096'
|
||||||
|
|||||||
28
.github/workflows/test.yml
vendored
@@ -31,7 +31,6 @@ jobs:
|
|||||||
|
|
||||||
test:
|
test:
|
||||||
needs: see_if_should_skip
|
needs: see_if_should_skip
|
||||||
if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
timeout-minutes: 60
|
timeout-minutes: 60
|
||||||
strategy:
|
strategy:
|
||||||
@@ -39,20 +38,26 @@ jobs:
|
|||||||
matrix:
|
matrix:
|
||||||
test-group: [content, meta, rendering, routing, unit, links-and-images]
|
test-group: [content, meta, rendering, routing, unit, links-and-images]
|
||||||
steps:
|
steps:
|
||||||
- name: Check out repo
|
# Each of these ifs needs to be repeated at each step to make sure the required check still runs
|
||||||
|
# Even if if doesn't do anything
|
||||||
|
- if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
|
||||||
|
name: Check out repo
|
||||||
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
|
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
|
||||||
|
|
||||||
- name: Setup node
|
- if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
|
||||||
|
name: Setup node
|
||||||
uses: actions/setup-node@56899e050abffc08c2b3b61f3ec6a79a9dc3223d
|
uses: actions/setup-node@56899e050abffc08c2b3b61f3ec6a79a9dc3223d
|
||||||
with:
|
with:
|
||||||
node-version: 14.x
|
node-version: 14.x
|
||||||
|
|
||||||
- name: Get npm cache directory
|
- if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
|
||||||
|
name: Get npm cache directory
|
||||||
id: npm-cache
|
id: npm-cache
|
||||||
run: |
|
run: |
|
||||||
echo "::set-output name=dir::$(npm config get cache)"
|
echo "::set-output name=dir::$(npm config get cache)"
|
||||||
|
|
||||||
- name: Cache node modules
|
- if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
|
||||||
|
name: Cache node modules
|
||||||
uses: actions/cache@0781355a23dac32fd3bac414512f4b903437991a
|
uses: actions/cache@0781355a23dac32fd3bac414512f4b903437991a
|
||||||
with:
|
with:
|
||||||
path: ${{ steps.npm-cache.outputs.dir }}
|
path: ${{ steps.npm-cache.outputs.dir }}
|
||||||
@@ -60,20 +65,23 @@ jobs:
|
|||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-node-
|
${{ runner.os }}-node-
|
||||||
|
|
||||||
- name: Install dependencies
|
- if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
|
||||||
|
name: Install dependencies
|
||||||
run: npm ci
|
run: npm ci
|
||||||
|
|
||||||
- name: Run build script
|
- if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
|
||||||
|
name: Run build script
|
||||||
run: npm run build
|
run: npm run build
|
||||||
|
|
||||||
- name: Run tests
|
- if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
|
||||||
|
name: Run tests
|
||||||
run: npx jest tests/${{ matrix.test-group }}/
|
run: npx jest tests/${{ matrix.test-group }}/
|
||||||
env:
|
env:
|
||||||
NODE_OPTIONS: "--max_old_space_size=4096"
|
NODE_OPTIONS: '--max_old_space_size=4096'
|
||||||
|
|
||||||
- name: Send Slack notification if workflow fails
|
- name: Send Slack notification if workflow fails
|
||||||
uses: rtCamp/action-slack-notify@e17352feaf9aee300bf0ebc1dfbf467d80438815
|
uses: rtCamp/action-slack-notify@e17352feaf9aee300bf0ebc1dfbf467d80438815
|
||||||
if: failure() && github.ref == 'early-access'
|
if: failure() && github.ref == 'early-access'
|
||||||
env:
|
env:
|
||||||
SLACK_WEBHOOK: ${{ secrets.DOCS_ALERTS_SLACK_WEBHOOK }}
|
SLACK_WEBHOOK: ${{ secrets.DOCS_ALERTS_SLACK_WEBHOOK }}
|
||||||
SLACK_MESSAGE: "Tests are failing on the `early-access` branch. https://github.com/github/docs-internal/tree/early-access"
|
SLACK_MESSAGE: 'Tests are failing on the `early-access` branch. https://github.com/github/docs-internal/tree/early-access'
|
||||||
|
|||||||
2
.github/workflows/translations.yml
vendored
@@ -2,7 +2,7 @@ name: Translations
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: "20 19 * * *" # once a day at 19:20 UTC / 11:20 PST
|
- cron: '20 19 * * *' # once a day at 19:20 UTC / 11:20 PST
|
||||||
|
|
||||||
env:
|
env:
|
||||||
FREEZE: ${{ secrets.FREEZE }}
|
FREEZE: ${{ secrets.FREEZE }}
|
||||||
|
|||||||
11
.github/workflows/triage-issue-comments.yml
vendored
@@ -1,7 +1,8 @@
|
|||||||
name: Triage new issue comments
|
name: Triage new issue comments
|
||||||
on:
|
on:
|
||||||
issue_comment:
|
issue_comment:
|
||||||
types: [created]
|
types:
|
||||||
|
- created
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
triage-issue-comments:
|
triage-issue-comments:
|
||||||
@@ -36,11 +37,11 @@ jobs:
|
|||||||
uses: rachmari/labeler@832d42ec5523f3c6d46e8168de71cd54363e3e2e
|
uses: rachmari/labeler@832d42ec5523f3c6d46e8168de71cd54363e3e2e
|
||||||
if: (steps.is-internal-contributor.outputs.result == 'false')
|
if: (steps.is-internal-contributor.outputs.result == 'false')
|
||||||
with:
|
with:
|
||||||
repo-token: "${{ secrets.GITHUB_TOKEN }}"
|
repo-token: '${{ secrets.GITHUB_TOKEN }}'
|
||||||
add-labels: "triage"
|
add-labels: 'triage'
|
||||||
- name: Triage to project board
|
- name: Triage to project board
|
||||||
uses: rachmari/actions-add-new-issue-to-column@1a459ef92308ba7c9c9dc2fcdd72f232495574a9
|
uses: rachmari/actions-add-new-issue-to-column@1a459ef92308ba7c9c9dc2fcdd72f232495574a9
|
||||||
with:
|
with:
|
||||||
action-token: ${{ secrets.GITHUB_TOKEN }}
|
action-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
project-url: "https://github.com/github/docs/projects/1"
|
project-url: 'https://github.com/github/docs/projects/1'
|
||||||
column-name: "Triage"
|
column-name: 'Triage'
|
||||||
|
|||||||
12
.github/workflows/triage-issues.yml
vendored
@@ -1,7 +1,9 @@
|
|||||||
name: Triage new issues
|
name: Triage new issues
|
||||||
on:
|
on:
|
||||||
issues:
|
issues:
|
||||||
types: [reopened, opened]
|
types:
|
||||||
|
- reopened
|
||||||
|
- opened
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
triage_issues:
|
triage_issues:
|
||||||
@@ -12,11 +14,11 @@ jobs:
|
|||||||
- name: Label new issues with 'triage'
|
- name: Label new issues with 'triage'
|
||||||
uses: rachmari/labeler@832d42ec5523f3c6d46e8168de71cd54363e3e2e
|
uses: rachmari/labeler@832d42ec5523f3c6d46e8168de71cd54363e3e2e
|
||||||
with:
|
with:
|
||||||
repo-token: "${{ secrets.GITHUB_TOKEN }}"
|
repo-token: '${{ secrets.GITHUB_TOKEN }}'
|
||||||
add-labels: "triage"
|
add-labels: 'triage'
|
||||||
- name: Triage to project board
|
- name: Triage to project board
|
||||||
uses: rachmari/actions-add-new-issue-to-column@1a459ef92308ba7c9c9dc2fcdd72f232495574a9
|
uses: rachmari/actions-add-new-issue-to-column@1a459ef92308ba7c9c9dc2fcdd72f232495574a9
|
||||||
with:
|
with:
|
||||||
action-token: ${{ secrets.GITHUB_TOKEN }}
|
action-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
project-url: "https://github.com/github/docs/projects/1"
|
project-url: 'https://github.com/github/docs/projects/1'
|
||||||
column-name: "Triage"
|
column-name: 'Triage'
|
||||||
|
|||||||
12
.github/workflows/triage-pull-requests.yml
vendored
@@ -1,7 +1,9 @@
|
|||||||
name: Triage new pull requests
|
name: Triage new pull requests
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
types: [reopened, opened]
|
types:
|
||||||
|
- reopened
|
||||||
|
- opened
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
triage_pulls:
|
triage_pulls:
|
||||||
@@ -12,11 +14,11 @@ jobs:
|
|||||||
- name: Label new pull requests with 'triage'
|
- name: Label new pull requests with 'triage'
|
||||||
uses: rachmari/labeler@832d42ec5523f3c6d46e8168de71cd54363e3e2e
|
uses: rachmari/labeler@832d42ec5523f3c6d46e8168de71cd54363e3e2e
|
||||||
with:
|
with:
|
||||||
repo-token: "${{ secrets.GITHUB_TOKEN }}"
|
repo-token: '${{ secrets.GITHUB_TOKEN }}'
|
||||||
add-labels: "triage"
|
add-labels: 'triage'
|
||||||
- name: Triage to project board
|
- name: Triage to project board
|
||||||
uses: rachmari/actions-add-new-issue-to-column@1a459ef92308ba7c9c9dc2fcdd72f232495574a9
|
uses: rachmari/actions-add-new-issue-to-column@1a459ef92308ba7c9c9dc2fcdd72f232495574a9
|
||||||
with:
|
with:
|
||||||
action-token: ${{ secrets.GITHUB_TOKEN }}
|
action-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
project-url: "https://github.com/github/docs/projects/1"
|
project-url: 'https://github.com/github/docs/projects/1'
|
||||||
column-name: "Triage"
|
column-name: 'Triage'
|
||||||
|
|||||||
4
.github/workflows/triage-stale-check.yml
vendored
@@ -1,7 +1,7 @@
|
|||||||
name: Public Repo Stale Check
|
name: Public Repo Stale Check
|
||||||
on:
|
on:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: "45 16 * * *" # Run each day at 16:45 UTC / 8:45 PST
|
- cron: '45 16 * * *' # Run each day at 16:45 UTC / 8:45 PST
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
stale:
|
stale:
|
||||||
@@ -16,3 +16,5 @@ jobs:
|
|||||||
days-before-stale: 7
|
days-before-stale: 7
|
||||||
days-before-close: 10
|
days-before-close: 10
|
||||||
stale-pr-label: 'stale'
|
stale-pr-label: 'stale'
|
||||||
|
exempt-pr-labels: 'never-stale'
|
||||||
|
exempt-issue-labels: 'never-stale'
|
||||||
|
|||||||
5
.github/workflows/update-graphql-files.yml
vendored
@@ -10,7 +10,7 @@ env:
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: "20 16 * * *" # run every day at 16:20 UTC / 8:20 PST
|
- cron: '20 16 * * *' # run every day at 16:20 UTC / 8:20 PST
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
update_graphql_files:
|
update_graphql_files:
|
||||||
@@ -52,7 +52,8 @@ jobs:
|
|||||||
token: ${{ secrets.OCTOMERGER_PAT_WITH_REPO_AND_WORKFLOW_SCOPE }}
|
token: ${{ secrets.OCTOMERGER_PAT_WITH_REPO_AND_WORKFLOW_SCOPE }}
|
||||||
commit-message: 'Action ran graphql scripts "update-files" and "build-changelog-from-markdown"'
|
commit-message: 'Action ran graphql scripts "update-files" and "build-changelog-from-markdown"'
|
||||||
title: GraphQL schema update
|
title: GraphQL schema update
|
||||||
body: "Hello! Some GraphQL data in github/github was updated recently. This PR
|
body:
|
||||||
|
"Hello! Some GraphQL data in github/github was updated recently. This PR
|
||||||
syncs up the GraphQL data in this repo.\n\n
|
syncs up the GraphQL data in this repo.\n\n
|
||||||
If CI passes, this PR will be auto-merged. :green_heart:\n\n
|
If CI passes, this PR will be auto-merged. :green_heart:\n\n
|
||||||
If CI does not pass or other problems arise, contact #docs-engineering on slack."
|
If CI does not pass or other problems arise, contact #docs-engineering on slack."
|
||||||
|
|||||||
56
.github/workflows/yml-lint.yml
vendored
Normal file
@@ -0,0 +1,56 @@
|
|||||||
|
name: Lint Yaml
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
pull_request:
|
||||||
|
branches-ignore:
|
||||||
|
- translations
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
see_if_should_skip:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
outputs:
|
||||||
|
should_skip: ${{ steps.skip_check.outputs.should_skip }}
|
||||||
|
steps:
|
||||||
|
- id: skip_check
|
||||||
|
uses: fkirc/skip-duplicate-actions@36feb0d8d062137530c2e00bd278d138fe191289
|
||||||
|
with:
|
||||||
|
cancel_others: 'false'
|
||||||
|
github_token: ${{ github.token }}
|
||||||
|
paths: '["**/*.yml", "**/*.yaml", "package*.json", ".github/workflows/yml-lint.yml"]'
|
||||||
|
|
||||||
|
lint:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: see_if_should_skip
|
||||||
|
if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
|
||||||
|
steps:
|
||||||
|
- name: Check out repo
|
||||||
|
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
|
||||||
|
|
||||||
|
- name: Setup node
|
||||||
|
uses: actions/setup-node@56899e050abffc08c2b3b61f3ec6a79a9dc3223d
|
||||||
|
with:
|
||||||
|
node-version: 14.x
|
||||||
|
|
||||||
|
- name: Get npm cache directory
|
||||||
|
id: npm-cache
|
||||||
|
run: |
|
||||||
|
echo "::set-output name=dir::$(npm config get cache)"
|
||||||
|
|
||||||
|
- name: Cache node modules
|
||||||
|
uses: actions/cache@0781355a23dac32fd3bac414512f4b903437991a
|
||||||
|
with:
|
||||||
|
path: ${{ steps.npm-cache.outputs.dir }}
|
||||||
|
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-node-
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: npm ci
|
||||||
|
|
||||||
|
- name: Run linter
|
||||||
|
run: npx prettier -c "**/*.{yml,yaml}"
|
||||||
6
.gitignore
vendored
@@ -4,8 +4,6 @@
|
|||||||
node_modules
|
node_modules
|
||||||
npm-debug.log
|
npm-debug.log
|
||||||
coverage
|
coverage
|
||||||
|
.linkinator
|
||||||
# blc: broken link checker
|
broken_links.md
|
||||||
blc_output.log
|
|
||||||
blc_output_internal.log
|
|
||||||
dist
|
dist
|
||||||
1
.prettierignore
Normal file
@@ -0,0 +1 @@
|
|||||||
|
translations/
|
||||||
12
.prettierrc.json
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"overrides": [
|
||||||
|
{
|
||||||
|
"files":[
|
||||||
|
"**/*.{yml,yaml}"
|
||||||
|
],
|
||||||
|
"options": {
|
||||||
|
"singleQuote": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -22,6 +22,7 @@ Examples of unacceptable behavior include:
|
|||||||
* Trolling, insulting or derogatory comments, and personal or political attacks
|
* Trolling, insulting or derogatory comments, and personal or political attacks
|
||||||
* Public or private harassment
|
* Public or private harassment
|
||||||
* Publishing others' private information, such as a physical or email address, without their explicit permission
|
* Publishing others' private information, such as a physical or email address, without their explicit permission
|
||||||
|
* Contacting individual members, contributors, or leaders privately, outside designated community mechanisms, without their explicit permission
|
||||||
* Other conduct which could reasonably be considered inappropriate in a professional setting
|
* Other conduct which could reasonably be considered inappropriate in a professional setting
|
||||||
|
|
||||||
## Enforcement Responsibilities
|
## Enforcement Responsibilities
|
||||||
|
|||||||
@@ -114,7 +114,8 @@ You can browse existing issues to find something that needs help!
|
|||||||
|
|
||||||
### Labels
|
### Labels
|
||||||
Labels can help you find an issue you'd like to help with.
|
Labels can help you find an issue you'd like to help with.
|
||||||
- The [`good-first-issue` label](https://github.com/github/docs/issues?q=is%3Aopen+is%3Aissue+label%3Agood-first-issue) is for problems or updates we think are ideal for beginners.
|
- The [`help wanted` label](https://github.com/github/docs/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22) is for problems or updates that anyone in the community can start working on.
|
||||||
|
- The [`good first issue` label](https://github.com/github/docs/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22) is for problems or updates we think are ideal for beginners.
|
||||||
- The [`content` label](https://github.com/github/docs/issues?q=is%3Aopen+is%3Aissue+label%3Acontent) is for problems or updates in the content on docs.github.com. These will usually require some knowledge of Markdown.
|
- The [`content` label](https://github.com/github/docs/issues?q=is%3Aopen+is%3Aissue+label%3Acontent) is for problems or updates in the content on docs.github.com. These will usually require some knowledge of Markdown.
|
||||||
- The [`engineering` label](https://github.com/github/docs/issues?q=is%3Aopen+is%3Aissue+label%3Aengineering) is for problems or updates in the docs.github.com website. These will usually require some knowledge of JavaScript/Node.js or YAML to fix.
|
- The [`engineering` label](https://github.com/github/docs/issues?q=is%3Aopen+is%3Aissue+label%3Aengineering) is for problems or updates in the docs.github.com website. These will usually require some knowledge of JavaScript/Node.js or YAML to fix.
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ This repository contains the documentation website code and Markdown source file
|
|||||||
GitHub's Docs team works on pre-production content in a private repo that regularly syncs with this public repo.
|
GitHub's Docs team works on pre-production content in a private repo that regularly syncs with this public repo.
|
||||||
|
|
||||||
In this article:
|
In this article:
|
||||||
|
|
||||||
- [Contributing](#contributing)
|
- [Contributing](#contributing)
|
||||||
- [READMEs](#readmes)
|
- [READMEs](#readmes)
|
||||||
- [License](#license)
|
- [License](#license)
|
||||||
@@ -34,6 +35,7 @@ If you have a solution to one of the open issues, you will need to fork the repo
|
|||||||
We use GitHub Discussions to talk about all sorts of topics related to documentation and this site. For example: if you'd like help troubleshooting a PR, have a great new idea, or want to share something amazing you've learned in our docs, join us in [discussions](https://github.com/github/docs/discussions).
|
We use GitHub Discussions to talk about all sorts of topics related to documentation and this site. For example: if you'd like help troubleshooting a PR, have a great new idea, or want to share something amazing you've learned in our docs, join us in [discussions](https://github.com/github/docs/discussions).
|
||||||
|
|
||||||
#### And that's it!
|
#### And that's it!
|
||||||
|
|
||||||
That's how you can get started easily as a member of the GitHub Documentation community. :sparkles:
|
That's how you can get started easily as a member of the GitHub Documentation community. :sparkles:
|
||||||
|
|
||||||
If you want to know more, or you're making a more complex contribution, check out [Getting Started with Contributing](/CONTRIBUTING.md).
|
If you want to know more, or you're making a more complex contribution, check out [Getting Started with Contributing](/CONTRIBUTING.md).
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 122 KiB |
|
Before Width: | Height: | Size: 90 KiB After Width: | Height: | Size: 123 KiB |
BIN
assets/images/help/codespaces/choose-sku-vscode.png
Normal file
|
After Width: | Height: | Size: 211 KiB |
|
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 295 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 383 KiB |
|
Before Width: | Height: | Size: 228 KiB After Width: | Height: | Size: 165 KiB |
|
Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 545 KiB |
|
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 406 KiB |
BIN
assets/images/help/desktop/discard-multiple-lines.png
Normal file
|
After Width: | Height: | Size: 73 KiB |
BIN
assets/images/help/desktop/discard-single-line.png
Normal file
|
After Width: | Height: | Size: 96 KiB |
BIN
assets/images/help/desktop/gear-diff-select.png
Normal file
|
After Width: | Height: | Size: 35 KiB |
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 19 KiB |
|
After Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 68 KiB After Width: | Height: | Size: 49 KiB |
|
Before Width: | Height: | Size: 68 KiB After Width: | Height: | Size: 76 KiB |
|
After Width: | Height: | Size: 43 KiB |
|
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 43 KiB |
|
After Width: | Height: | Size: 630 KiB |
|
Before Width: | Height: | Size: 70 KiB After Width: | Height: | Size: 46 KiB |
|
Before Width: | Height: | Size: 39 KiB After Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 82 KiB After Width: | Height: | Size: 39 KiB |
|
Before Width: | Height: | Size: 8.7 KiB After Width: | Height: | Size: 34 KiB |
|
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 34 KiB |
BIN
assets/images/help/settings/feature-preview-setting.png
Normal file
|
After Width: | Height: | Size: 58 KiB |
BIN
assets/images/help/settings/improved-container-support.png
Normal file
|
After Width: | Height: | Size: 56 KiB |
@@ -91,7 +91,7 @@ steps:
|
|||||||
|
|
||||||
### Caching dependencies
|
### Caching dependencies
|
||||||
|
|
||||||
You can cache your dependencies to speed up your workflow runs. After a successful run, your local Gradle package cache will be stored on GitHub Actions infrastructure. In future workflow runs, the cache will be restored so that dependencies don't need to be downloaded from remote package repositories. For more information, see "[Caching dependencies to speed up workflows](/actions/automating-your-workflow-with-github-actions/caching-dependencies-to-speed-up-workflows)" and the [`cache` action](https://github.com/marketplace/actions/cache).
|
When using {% data variables.product.prodname_dotcom %}-hosted runners, you can cache your dependencies to speed up your workflow runs. After a successful run, your local Gradle package cache will be stored on GitHub Actions infrastructure. In future workflow runs, the cache will be restored so that dependencies don't need to be downloaded from remote package repositories. For more information, see "<a href="/actions/guides/caching-dependencies-to-speed-up-workflows" class="dotcom-only">Caching dependencies to speed up workflows</a>" and the [`cache` action](https://github.com/marketplace/actions/cache).
|
||||||
|
|
||||||
{% raw %}
|
{% raw %}
|
||||||
```yaml
|
```yaml
|
||||||
|
|||||||
@@ -91,7 +91,7 @@ steps:
|
|||||||
|
|
||||||
### Caching dependencies
|
### Caching dependencies
|
||||||
|
|
||||||
You can cache your dependencies to speed up your workflow runs. After a successful run, your local Maven repository will be stored on GitHub Actions infrastructure. In future workflow runs, the cache will be restored so that dependencies don't need to be downloaded from remote Maven repositories. For more information, see "[Caching dependencies to speed up workflows](/actions/automating-your-workflow-with-github-actions/caching-dependencies-to-speed-up-workflows)" and the [`cache` action](https://github.com/marketplace/actions/cache).
|
When using {% data variables.product.prodname_dotcom %}-hosted runners, you can cache your dependencies to speed up your workflow runs. After a successful run, your local Maven repository will be stored on GitHub Actions infrastructure. In future workflow runs, the cache will be restored so that dependencies don't need to be downloaded from remote Maven repositories. For more information, see "<a href="/actions/guides/caching-dependencies-to-speed-up-workflows" class="dotcom-only">Caching dependencies to speed up workflows</a>" and the [`cache` action](https://github.com/marketplace/actions/cache).
|
||||||
|
|
||||||
{% raw %}
|
{% raw %}
|
||||||
```yaml
|
```yaml
|
||||||
|
|||||||
@@ -129,7 +129,7 @@ If you don't specify a Node.js version, {% data variables.product.prodname_dotco
|
|||||||
|
|
||||||
{% data variables.product.prodname_dotcom %}-hosted runners have npm and Yarn dependency managers installed. You can use npm and Yarn to install dependencies in your workflow before building and testing your code. The Windows and Linux {% data variables.product.prodname_dotcom %}-hosted runners also have Grunt, Gulp, and Bower installed.
|
{% data variables.product.prodname_dotcom %}-hosted runners have npm and Yarn dependency managers installed. You can use npm and Yarn to install dependencies in your workflow before building and testing your code. The Windows and Linux {% data variables.product.prodname_dotcom %}-hosted runners also have Grunt, Gulp, and Bower installed.
|
||||||
|
|
||||||
You can also cache dependencies to speed up your workflow. For more information, see "[Caching dependencies to speed up your workflow](/actions/automating-your-workflow-with-github-actions/caching-dependencies-to-speed-up-workflows)."
|
When using {% data variables.product.prodname_dotcom %}-hosted runners, you can also cache dependencies to speed up your workflow. For more information, see "<a href="/actions/guides/caching-dependencies-to-speed-up-workflows" class="dotcom-only">Caching dependencies to speed up workflows</a>."
|
||||||
|
|
||||||
#### Example using npm
|
#### Example using npm
|
||||||
|
|
||||||
@@ -227,7 +227,7 @@ always-auth=true
|
|||||||
|
|
||||||
#### Example caching dependencies
|
#### Example caching dependencies
|
||||||
|
|
||||||
You can cache dependencies using a unique key, and restore the dependencies when you run future workflows using the `cache` action. For more information, see "[Caching dependencies to speed up workflows](/actions/automating-your-workflow-with-github-actions/caching-dependencies-to-speed-up-workflows)" and the [`cache` action](https://github.com/marketplace/actions/cache).
|
When using {% data variables.product.prodname_dotcom %}-hosted runners, you can cache dependencies using a unique key, and restore the dependencies when you run future workflows using the `cache` action. For more information, see "<a href="/actions/guides/caching-dependencies-to-speed-up-workflows" class="dotcom-only">Caching dependencies to speed up workflows</a>" and the [`cache` action](https://github.com/marketplace/actions/cache).
|
||||||
|
|
||||||
{% raw %}
|
{% raw %}
|
||||||
```yaml
|
```yaml
|
||||||
|
|||||||
@@ -5,6 +5,8 @@ product: '{% data reusables.gated-features.actions %}'
|
|||||||
versions:
|
versions:
|
||||||
free-pro-team: '*'
|
free-pro-team: '*'
|
||||||
enterprise-server: '>=2.22'
|
enterprise-server: '>=2.22'
|
||||||
|
authors:
|
||||||
|
- potatoqualitee
|
||||||
---
|
---
|
||||||
|
|
||||||
{% data reusables.actions.enterprise-beta %}
|
{% data reusables.actions.enterprise-beta %}
|
||||||
@@ -89,7 +91,7 @@ The table below describes the locations for various PowerShell modules in each {
|
|||||||
|
|
||||||
{% endnote %}
|
{% endnote %}
|
||||||
|
|
||||||
You can also cache dependencies to speed up your workflow. For more information, see "[Caching dependencies to speed up your workflow](/actions/automating-your-workflow-with-github-actions/caching-dependencies-to-speed-up-workflows)."
|
When using {% data variables.product.prodname_dotcom %}-hosted runners, you can also cache dependencies to speed up your workflow. For more information, see "<a href="/actions/guides/caching-dependencies-to-speed-up-workflows" class="dotcom-only">Caching dependencies to speed up workflows</a>."
|
||||||
|
|
||||||
For example, the following job installs the `SqlServer` and `PSScriptAnalyzer` modules:
|
For example, the following job installs the `SqlServer` and `PSScriptAnalyzer` modules:
|
||||||
|
|
||||||
@@ -117,7 +119,7 @@ jobs:
|
|||||||
|
|
||||||
#### Caching dependencies
|
#### Caching dependencies
|
||||||
|
|
||||||
You can cache PowerShell dependencies using a unique key, which allows you to restore the dependencies for future workflows with the [`cache`](https://github.com/marketplace/actions/cache) action. For more information, see "[Caching dependencies to speed up workflows](/actions/automating-your-workflow-with-github-actions/caching-dependencies-to-speed-up-workflows)."
|
When using {% data variables.product.prodname_dotcom %}-hosted runners, you can cache PowerShell dependencies using a unique key, which allows you to restore the dependencies for future workflows with the [`cache`](https://github.com/marketplace/actions/cache) action. For more information, see "<a href="/actions/guides/caching-dependencies-to-speed-up-workflows" class="dotcom-only">Caching dependencies to speed up workflows</a>."
|
||||||
|
|
||||||
PowerShell caches its dependencies in different locations, depending on the runner's operating system. For example, the `path` location used in the following Ubuntu example will be different for a Windows operating system.
|
PowerShell caches its dependencies in different locations, depending on the runner's operating system. For example, the `path` location used in the following Ubuntu example will be different for a Windows operating system.
|
||||||
|
|
||||||
|
|||||||
@@ -192,7 +192,7 @@ We recommend using `setup-python` to configure the version of Python used in you
|
|||||||
|
|
||||||
{% data variables.product.prodname_dotcom %}-hosted runners have the pip package manager installed. You can use pip to install dependencies from the PyPI package registry before building and testing your code. For example, the YAML below installs or upgrades the `pip` package installer and the `setuptools` and `wheel` packages.
|
{% data variables.product.prodname_dotcom %}-hosted runners have the pip package manager installed. You can use pip to install dependencies from the PyPI package registry before building and testing your code. For example, the YAML below installs or upgrades the `pip` package installer and the `setuptools` and `wheel` packages.
|
||||||
|
|
||||||
You can also cache dependencies to speed up your workflow. For more information, see "[Caching dependencies to speed up your workflow](/actions/automating-your-workflow-with-github-actions/caching-dependencies-to-speed-up-workflows)."
|
When using {% data variables.product.prodname_dotcom %}-hosted runners, you can also cache dependencies to speed up your workflow. For more information, see "<a href="/actions/guides/caching-dependencies-to-speed-up-workflows" class="dotcom-only">Caching dependencies to speed up workflows</a>."
|
||||||
|
|
||||||
{% raw %}
|
{% raw %}
|
||||||
```yaml
|
```yaml
|
||||||
@@ -228,7 +228,7 @@ steps:
|
|||||||
|
|
||||||
#### Caching Dependencies
|
#### Caching Dependencies
|
||||||
|
|
||||||
You can cache pip dependencies using a unique key, and restore the dependencies when you run future workflows using the [`cache`](https://github.com/marketplace/actions/cache) action. For more information, see "[Caching dependencies to speed up workflows](/actions/automating-your-workflow-with-github-actions/caching-dependencies-to-speed-up-workflows)."
|
When using {% data variables.product.prodname_dotcom %}-hosted runners, you can cache pip dependencies using a unique key, and restore the dependencies when you run future workflows using the [`cache`](https://github.com/marketplace/actions/cache) action. For more information, see "<a href="/actions/guides/caching-dependencies-to-speed-up-workflows" class="dotcom-only">Caching dependencies to speed up workflows</a>."
|
||||||
|
|
||||||
Pip caches dependencies in different locations, depending on the operating system of the runner. The path you'll need to cache may differ from the Ubuntu example below depending on the operating system you use. For more information, see [Python caching examples](https://github.com/actions/cache/blob/main/examples.md#python---pip).
|
Pip caches dependencies in different locations, depending on the operating system of the runner. The path you'll need to cache may differ from the Ubuntu example below depending on the operating system you use. For more information, see [Python caching examples](https://github.com/actions/cache/blob/main/examples.md#python---pip).
|
||||||
|
|
||||||
|
|||||||
318
content/actions/guides/building-and-testing-ruby.md
Normal file
@@ -0,0 +1,318 @@
|
|||||||
|
---
|
||||||
|
title: Building and testing Ruby
|
||||||
|
intro: You can create a continuous integration (CI) workflow to build and test your Ruby project.
|
||||||
|
product: '{% data reusables.gated-features.actions %}'
|
||||||
|
versions:
|
||||||
|
free-pro-team: '*'
|
||||||
|
enterprise-server: '>=2.22'
|
||||||
|
---
|
||||||
|
|
||||||
|
{% data reusables.actions.enterprise-beta %}
|
||||||
|
{% data reusables.actions.enterprise-github-hosted-runners %}
|
||||||
|
|
||||||
|
### Introduction
|
||||||
|
|
||||||
|
This guide shows you how to create a continuous integration (CI) workflow that builds and tests a Ruby application. If your CI tests pass, you may want to deploy your code or publish a gem.
|
||||||
|
|
||||||
|
### Prerequisites
|
||||||
|
|
||||||
|
We recommend that you have a basic understanding of Ruby, YAML, workflow configuration options, and how to create a workflow file. For more information, see:
|
||||||
|
|
||||||
|
- [Learn {% data variables.product.prodname_actions %}](/actions/learn-github-actions)
|
||||||
|
- [Ruby in 20 minutes](https://www.ruby-lang.org/en/documentation/quickstart/)
|
||||||
|
|
||||||
|
### Starting with the Ruby workflow template
|
||||||
|
|
||||||
|
{% data variables.product.prodname_dotcom %} provides a Ruby workflow template that will work for most Ruby projects. For more information, see the [Ruby workflow template](https://github.com/actions/starter-workflows/blob/master/ci/ruby.yml).
|
||||||
|
|
||||||
|
To get started quickly, add the template to the `.github/workflows` directory of your repository.
|
||||||
|
|
||||||
|
{% raw %}
|
||||||
|
```yaml
|
||||||
|
name: Ruby
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ $default-branch ]
|
||||||
|
pull_request:
|
||||||
|
branches: [ $default-branch ]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test:
|
||||||
|
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: Set up Ruby
|
||||||
|
# To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
|
||||||
|
# change this to (see https://github.com/ruby/setup-ruby#versioning):
|
||||||
|
# uses: ruby/setup-ruby@v1
|
||||||
|
uses: ruby/setup-ruby@ec106b438a1ff6ff109590de34ddc62c540232e0
|
||||||
|
with:
|
||||||
|
ruby-version: 2.6
|
||||||
|
- name: Install dependencies
|
||||||
|
run: bundle install
|
||||||
|
- name: Run tests
|
||||||
|
run: bundle exec rake
|
||||||
|
```
|
||||||
|
{% endraw %}
|
||||||
|
|
||||||
|
### Specifying the Ruby version
|
||||||
|
|
||||||
|
The easiest way to specify a Ruby version is by using the `ruby/setup-ruby` action provided by the Ruby organization on GitHub. The action adds any supported Ruby version to `PATH` for each job run in a workflow. For more information see, the [`ruby/setup-ruby`](https://github.com/ruby/setup-ruby).
|
||||||
|
|
||||||
|
Using either Ruby's `ruby/setup-ruby` action or GitHub's `actions/setup-ruby` action is the recommended way of using Ruby with GitHub Actions because it ensures consistent behavior across different runners and different versions of Ruby.
|
||||||
|
|
||||||
|
The `setup-ruby` action takes a Ruby version as an input and configures that version on the runner.
|
||||||
|
|
||||||
|
{% raw %}
|
||||||
|
```yaml
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- uses: ruby/setup-ruby@v1
|
||||||
|
with:
|
||||||
|
ruby-version: 2.6 # Not needed with a .ruby-version file
|
||||||
|
- run: bundle install
|
||||||
|
- run: bundle exec rake
|
||||||
|
```
|
||||||
|
{% endraw %}
|
||||||
|
|
||||||
|
Alternatively, you can check a `.ruby-version` file into the root of your repository and `setup-ruby` will use the version defined in that file.
|
||||||
|
|
||||||
|
### Testing with multiple versions of Ruby
|
||||||
|
|
||||||
|
You can add a matrix strategy to run your workflow with more than one version of Ruby. For example, you can test your code against the latest patch releases of versions 2.7, 2.6, and 2.5. The 'x' is a wildcard character that matches the latest patch release available for a version.
|
||||||
|
|
||||||
|
{% raw %}
|
||||||
|
```yaml
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
ruby-version: [2.7.x, 2.6.x, 2.5.x]
|
||||||
|
```
|
||||||
|
{% endraw %}
|
||||||
|
|
||||||
|
Each version of Ruby specified in the `ruby-version` array creates a job that runs the same steps. The {% raw %}`${{ matrix.ruby-version }}`{% endraw %} context is used to access the current job's version. For more information about matrix strategies and contexts, see "Workflow syntax for GitHub Actions" and "Context and expression syntax for GitHub Actions."
|
||||||
|
|
||||||
|
The full updated workflow with a matrix strategy could look like this:
|
||||||
|
|
||||||
|
{% raw %}
|
||||||
|
```yaml
|
||||||
|
name: Ruby CI
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ $default-branch ]
|
||||||
|
pull_request:
|
||||||
|
branches: [ $default-branch ]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test:
|
||||||
|
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
ruby-version: [2.7.x, 2.6.x, 2.5.x]
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: Set up Ruby ${{ matrix.ruby-version }}
|
||||||
|
# To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
|
||||||
|
# change this to (see https://github.com/ruby/setup-ruby#versioning):
|
||||||
|
# uses: ruby/setup-ruby@v1
|
||||||
|
uses: ruby/setup-ruby@ec106b438a1ff6ff109590de34ddc62c540232e0
|
||||||
|
with:
|
||||||
|
ruby-version: ${{ matrix.ruby-version }}
|
||||||
|
- name: Install dependencies
|
||||||
|
run: bundle install
|
||||||
|
- name: Run tests
|
||||||
|
run: bundle exec rake
|
||||||
|
```
|
||||||
|
{% endraw %}
|
||||||
|
|
||||||
|
### Installing dependencies with Bundler
|
||||||
|
|
||||||
|
The `setup-ruby` action will automatically install bundler for you. The version is determined by your `gemfile.lock` file. If no version is present in your lockfile, then the latest compatible version will be installed.
|
||||||
|
|
||||||
|
{% raw %}
|
||||||
|
```yaml
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- uses: ruby/setup-ruby@v1
|
||||||
|
with:
|
||||||
|
ruby-version: 2.6
|
||||||
|
- run: bundle install
|
||||||
|
```
|
||||||
|
{% endraw %}
|
||||||
|
|
||||||
|
#### Caching dependencies
|
||||||
|
|
||||||
|
If you are using {% data variables.product.prodname_dotcom %}-hosted runners, the `setup-ruby` actions provides a method to automatically handle the caching of your gems between runs.
|
||||||
|
|
||||||
|
To enable caching, set the following.
|
||||||
|
|
||||||
|
{% raw %}
|
||||||
|
```yaml
|
||||||
|
steps:
|
||||||
|
- uses: ruby/setup-ruby@v1
|
||||||
|
with:
|
||||||
|
bundler-cache: true
|
||||||
|
```
|
||||||
|
{% endraw %}
|
||||||
|
|
||||||
|
This will configure bundler to install your gems to `vendor/cache`. For each successful run of your workflow, this folder will be cached by Actions and re-downloaded for subsequent workflow runs. A hash of your gemfile.lock and the Ruby version are used as the cache key. If you install any new gems, or change a version, the cache will be invalidated and bundler will do a fresh install.
|
||||||
|
|
||||||
|
**Caching without setup-ruby**
|
||||||
|
|
||||||
|
For greater control over caching, if you are using {% data variables.product.prodname_dotcom %}-hosted runners, you can use the `actions/cache` Action directly. For more information, see "<a href="/actions/guides/caching-dependencies-to-speed-up-workflows" class="dotcom-only">Caching dependencies to speed up workflows</a>."
|
||||||
|
|
||||||
|
{% raw %}
|
||||||
|
```yaml
|
||||||
|
steps:
|
||||||
|
- uses: actions/cache@v2
|
||||||
|
with:
|
||||||
|
path: vendor/bundle
|
||||||
|
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-gems-
|
||||||
|
- name: Bundle install
|
||||||
|
run: |
|
||||||
|
bundle config path vendor/bundle
|
||||||
|
bundle install --jobs 4 --retry 3
|
||||||
|
```
|
||||||
|
{% endraw %}
|
||||||
|
|
||||||
|
If you're using a matrix build, you will want to include the matrix variables in your cache key. For example, if you have a matrix strategy for different ruby versions (`matrix.ruby-version`) and different operating systems (`matrix.os`), your workflow steps might look like this:
|
||||||
|
|
||||||
|
{% raw %}
|
||||||
|
```yaml
|
||||||
|
steps:
|
||||||
|
- uses: actions/cache@v2
|
||||||
|
with:
|
||||||
|
path: vendor/bundle
|
||||||
|
key: bundle-use-ruby-${{ matrix.os }}-${{ matrix.ruby-version }}-${{ hashFiles('**/Gemfile.lock') }}
|
||||||
|
restore-keys: |
|
||||||
|
bundle-use-ruby-${{ matrix.os }}-${{ matrix.ruby-version }}-
|
||||||
|
- name: Bundle install
|
||||||
|
run: |
|
||||||
|
bundle config path vendor/bundle
|
||||||
|
bundle install --jobs 4 --retry 3
|
||||||
|
```
|
||||||
|
{% endraw %}
|
||||||
|
|
||||||
|
### Matrix testing your code
|
||||||
|
|
||||||
|
The following example matrix tests all stable releases and head versions of MRI, JRuby and TruffleRuby on Ubuntu and macOS.
|
||||||
|
|
||||||
|
{% raw %}
|
||||||
|
```yaml
|
||||||
|
name: Matrix Testing
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ $default-branch ]
|
||||||
|
pull_request:
|
||||||
|
branches: [ $default-branch ]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test:
|
||||||
|
runs-on: ${{ matrix.os }}-latest
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
os: [ubuntu, macos]
|
||||||
|
ruby: [2.5, 2.6, 2.7, head, debug, jruby, jruby-head, truffleruby, truffleruby-head]
|
||||||
|
continue-on-error: ${{ endsWith(matrix.ruby, 'head') || matrix.ruby == 'debug' }}
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- uses: ruby/setup-ruby@v1
|
||||||
|
with:
|
||||||
|
ruby-version: ${{ matrix.ruby }}
|
||||||
|
- run: bundle install
|
||||||
|
- run: bundle exec rake
|
||||||
|
```
|
||||||
|
{% endraw %}
|
||||||
|
|
||||||
|
### Linting your code
|
||||||
|
|
||||||
|
The following example installs `rubocop` and uses it to lint all files. For more information, see [Rubocop](https://github.com/rubocop-hq/rubocop). You can [configure Rubocop](https://docs.rubocop.org/rubocop/configuration.html) to decide on the specific linting rules.
|
||||||
|
|
||||||
|
{% raw %}
|
||||||
|
```yaml
|
||||||
|
name: Linting
|
||||||
|
|
||||||
|
on: [push]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- uses: ruby/setup-ruby@v1
|
||||||
|
with:
|
||||||
|
ruby-version: 2.6
|
||||||
|
- run: bundle install
|
||||||
|
- name: Rubocop
|
||||||
|
run: rubocop
|
||||||
|
```
|
||||||
|
{% endraw %}
|
||||||
|
|
||||||
|
### Publishing Gems
|
||||||
|
|
||||||
|
You can configure your workflow to publish your Ruby package to any package registry you'd like when your CI tests pass.
|
||||||
|
|
||||||
|
You can store any access tokens or credentials needed to publish your package using repository secrets. The following example creates and publishes a package to `GitHub Package Registry` and `RubyGems`.
|
||||||
|
|
||||||
|
{% raw %}
|
||||||
|
```yaml
|
||||||
|
|
||||||
|
name: Ruby Gem
|
||||||
|
|
||||||
|
on:
|
||||||
|
# Manually publish
|
||||||
|
workflow_dispatch:
|
||||||
|
# Alternatively, publish whenever changes are merged to the default branch.
|
||||||
|
push:
|
||||||
|
branches: [ $default-branch ]
|
||||||
|
pull_request:
|
||||||
|
branches: [ $default-branch ]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
name: Build + Publish
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: Set up Ruby 2.6
|
||||||
|
uses: ruby/setup-ruby@v1
|
||||||
|
with:
|
||||||
|
ruby-version: 2.6
|
||||||
|
- run: bundle install
|
||||||
|
|
||||||
|
- name: Publish to GPR
|
||||||
|
run: |
|
||||||
|
mkdir -p $HOME/.gem
|
||||||
|
touch $HOME/.gem/credentials
|
||||||
|
chmod 0600 $HOME/.gem/credentials
|
||||||
|
printf -- "---\n:github: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
|
||||||
|
gem build *.gemspec
|
||||||
|
gem push --KEY github --host https://rubygems.pkg.github.com/${OWNER} *.gem
|
||||||
|
env:
|
||||||
|
GEM_HOST_API_KEY: "Bearer ${{secrets.GITHUB_TOKEN}}"
|
||||||
|
OWNER: ${{ github.repository_owner }}
|
||||||
|
|
||||||
|
- name: Publish to RubyGems
|
||||||
|
run: |
|
||||||
|
mkdir -p $HOME/.gem
|
||||||
|
touch $HOME/.gem/credentials
|
||||||
|
chmod 0600 $HOME/.gem/credentials
|
||||||
|
printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
|
||||||
|
gem build *.gemspec
|
||||||
|
gem push *.gem
|
||||||
|
env:
|
||||||
|
GEM_HOST_API_KEY: "${{secrets.RUBYGEMS_AUTH_TOKEN}}"
|
||||||
|
```
|
||||||
|
{% endraw %}
|
||||||
|
|
||||||
@@ -31,6 +31,7 @@ You can use {% data variables.product.prodname_actions %} to create custom conti
|
|||||||
{% link_in_list /building-and-testing-nodejs %}
|
{% link_in_list /building-and-testing-nodejs %}
|
||||||
{% link_in_list /building-and-testing-powershell %}
|
{% link_in_list /building-and-testing-powershell %}
|
||||||
{% link_in_list /building-and-testing-python %}
|
{% link_in_list /building-and-testing-python %}
|
||||||
|
{% link_in_list /building-and-testing-ruby %}
|
||||||
{% link_in_list /building-and-testing-java-with-maven %}
|
{% link_in_list /building-and-testing-java-with-maven %}
|
||||||
{% link_in_list /building-and-testing-java-with-gradle %}
|
{% link_in_list /building-and-testing-java-with-gradle %}
|
||||||
{% link_in_list /building-and-testing-java-with-ant %}
|
{% link_in_list /building-and-testing-java-with-ant %}
|
||||||
|
|||||||
@@ -8,6 +8,8 @@ redirect_from:
|
|||||||
versions:
|
versions:
|
||||||
free-pro-team: '*'
|
free-pro-team: '*'
|
||||||
enterprise-server: '>=2.22'
|
enterprise-server: '>=2.22'
|
||||||
|
authors:
|
||||||
|
- GitHub
|
||||||
---
|
---
|
||||||
|
|
||||||
{% data reusables.actions.enterprise-beta %}
|
{% data reusables.actions.enterprise-beta %}
|
||||||
|
|||||||
@@ -11,6 +11,8 @@ redirect_from:
|
|||||||
versions:
|
versions:
|
||||||
free-pro-team: '*'
|
free-pro-team: '*'
|
||||||
enterprise-server: '>=2.22'
|
enterprise-server: '>=2.22'
|
||||||
|
authors:
|
||||||
|
- GitHub
|
||||||
---
|
---
|
||||||
|
|
||||||
{% data reusables.actions.enterprise-beta %}
|
{% data reusables.actions.enterprise-beta %}
|
||||||
|
|||||||
@@ -131,7 +131,7 @@ The `retention-days` value cannot exceed the retention limit set by the reposito
|
|||||||
|
|
||||||
During a workflow run, you can use the [`download-artifact`](https://github.com/actions/download-artifact)action to download artifacts that were previously uploaded in the same workflow run.
|
During a workflow run, you can use the [`download-artifact`](https://github.com/actions/download-artifact)action to download artifacts that were previously uploaded in the same workflow run.
|
||||||
|
|
||||||
After a workflow run has been completed, you can download or delete artifacts on {% data variables.product.prodname_dotcom %} or using the REST API. For more information, see "[Downloading workflow artifacts](/actions/managing-workflow-runs/downloading-workflow-artifacts)," "[Removing workflow artifacts](/actions/managing-workflow-runs/removing-workflow-artifacts)," and the "[Artifacts REST API](/v3/actions/artifacts/)."
|
After a workflow run has been completed, you can download or delete artifacts on {% data variables.product.prodname_dotcom %} or using the REST API. For more information, see "[Downloading workflow artifacts](/actions/managing-workflow-runs/downloading-workflow-artifacts)," "[Removing workflow artifacts](/actions/managing-workflow-runs/removing-workflow-artifacts)," and the "[Artifacts REST API](/rest/reference/actions#artifacts)."
|
||||||
|
|
||||||
#### Downloading artifacts during a workflow run
|
#### Downloading artifacts during a workflow run
|
||||||
|
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ All organizations have a single default self-hosted runner group. Organizations
|
|||||||
|
|
||||||
Self-hosted runners are automatically assigned to the default group when created, and can only be members of one group at a time. You can move a runner from the default group to any group you create.
|
Self-hosted runners are automatically assigned to the default group when created, and can only be members of one group at a time. You can move a runner from the default group to any group you create.
|
||||||
|
|
||||||
When creating a group, you must choose a policy that defines which repositories have access to the runner group. You can configure a runner group to be accessible to a specific list of repositories, all private repositories, or all repositories in the organization.
|
When creating a group, you must choose a policy that defines which repositories have access to the runner group.
|
||||||
|
|
||||||
{% data reusables.organizations.navigate-to-org %}
|
{% data reusables.organizations.navigate-to-org %}
|
||||||
{% data reusables.organizations.org_settings %}
|
{% data reusables.organizations.org_settings %}
|
||||||
@@ -41,7 +41,19 @@ When creating a group, you must choose a policy that defines which repositories
|
|||||||
1. In the **Self-hosted runners** section, click **Add new**, and then **New group**.
|
1. In the **Self-hosted runners** section, click **Add new**, and then **New group**.
|
||||||
|
|
||||||

|

|
||||||
1. Enter a name for your runner group, and select an access policy from the **Repository access** dropdown list.
|
1. Enter a name for your runner group, and assign a policy for repository access.
|
||||||
|
|
||||||
|
{% if currentVersion == "free-pro-team@latest" or currentVersion ver_gt "enterprise-server@2.22" %} You can configure a runner group to be accessible to a specific list of repositories, or to all repositories in the organization. By default, public repositories can't access runners in a runner group, but you can use the **Allow public repositories** option to override this.{% else if currentVersion == "enterprise-server@2.22"%}You can configure a runner group to be accessible to a specific list of repositories, all private repositories, or all repositories in the organization.{% endif %}
|
||||||
|
|
||||||
|
{% warning %}
|
||||||
|
|
||||||
|
**Warning**
|
||||||
|
|
||||||
|
{% indented_data_reference site.data.reusables.github-actions.self-hosted-runner-security spaces=3 %}
|
||||||
|
|
||||||
|
For more information, see "[About self-hosted runners](/actions/hosting-your-own-runners/about-self-hosted-runners#self-hosted-runner-security-with-public-repositories)."
|
||||||
|
|
||||||
|
{% endwarning %}
|
||||||
|
|
||||||

|

|
||||||
1. Click **Save group** to create the group and apply the policy.
|
1. Click **Save group** to create the group and apply the policy.
|
||||||
@@ -52,7 +64,7 @@ Enterprises can add their self-hosted runners to groups for access management. E
|
|||||||
|
|
||||||
Self-hosted runners are automatically assigned to the default group when created, and can only be members of one group at a time. You can assign the runner to a specific group during the registration process, or you can later move the runner from the default group to a custom group.
|
Self-hosted runners are automatically assigned to the default group when created, and can only be members of one group at a time. You can assign the runner to a specific group during the registration process, or you can later move the runner from the default group to a custom group.
|
||||||
|
|
||||||
When creating a group, you must choose a policy that grants access to all organizations in the enterprise or choose specific organizations.
|
When creating a group, you must choose a policy that defines which organizations have access to the runner group.
|
||||||
|
|
||||||
{% data reusables.enterprise-accounts.access-enterprise %}
|
{% data reusables.enterprise-accounts.access-enterprise %}
|
||||||
{% data reusables.enterprise-accounts.policies-tab %}
|
{% data reusables.enterprise-accounts.policies-tab %}
|
||||||
@@ -61,7 +73,19 @@ When creating a group, you must choose a policy that grants access to all organi
|
|||||||
1. Click **Add new**, and then **New group**.
|
1. Click **Add new**, and then **New group**.
|
||||||
|
|
||||||

|

|
||||||
1. Enter a name for your runner group, and select an access policy from the **Organization access** dropdown list.
|
1. Enter a name for your runner group, and assign a policy for organization access.
|
||||||
|
|
||||||
|
{% if currentVersion == "free-pro-team@latest" or currentVersion ver_gt "enterprise-server@2.22" %} You can configure a runner group to be accessible to a specific list of organizations, or all organizations in the enterprise. By default, public repositories can't access runners in a runner group, but you can use the **Allow public repositories** option to override this.{% else if currentVersion == "enterprise-server@2.22"%}You can configure a runner group to be accessible to all organizations in the enterprise or choose specific organizations.{% endif %}
|
||||||
|
|
||||||
|
{% warning %}
|
||||||
|
|
||||||
|
**Warning**
|
||||||
|
|
||||||
|
{% indented_data_reference site.data.reusables.github-actions.self-hosted-runner-security spaces=3 %}
|
||||||
|
|
||||||
|
For more information, see "[About self-hosted runners](/actions/hosting-your-own-runners/about-self-hosted-runners#self-hosted-runner-security-with-public-repositories)."
|
||||||
|
|
||||||
|
{% endwarning %}
|
||||||
|
|
||||||

|

|
||||||
1. Click **Save group** to create the group and apply the policy.
|
1. Click **Save group** to create the group and apply the policy.
|
||||||
|
|||||||
@@ -7,27 +7,37 @@ introLinks:
|
|||||||
reference: /actions/reference
|
reference: /actions/reference
|
||||||
featuredLinks:
|
featuredLinks:
|
||||||
guides:
|
guides:
|
||||||
- /actions/guides/setting-up-continuous-integration-using-workflow-templates
|
- /actions/learn-github-actions
|
||||||
|
- /actions/guides/about-continuous-integration
|
||||||
- /actions/guides/about-packaging-with-github-actions
|
- /actions/guides/about-packaging-with-github-actions
|
||||||
gettingStarted:
|
gettingStarted:
|
||||||
- /actions/managing-workflow-runs
|
- /actions/managing-workflow-runs
|
||||||
- /actions/hosting-your-own-runners
|
- /actions/hosting-your-own-runners
|
||||||
|
guideCards:
|
||||||
|
- /actions/guides/setting-up-continuous-integration-using-workflow-templates
|
||||||
|
- /actions/guides/publishing-nodejs-packages
|
||||||
|
- /actions/guides/building-and-testing-powershell
|
||||||
popular:
|
popular:
|
||||||
- /actions/reference/workflow-syntax-for-github-actions
|
- /actions/reference/workflow-syntax-for-github-actions
|
||||||
- /actions/reference/events-that-trigger-workflows
|
- /actions/reference/events-that-trigger-workflows
|
||||||
|
- /actions/learn-github-actions
|
||||||
|
- /actions/reference/context-and-expression-syntax-for-github-actions
|
||||||
|
- /actions/reference/workflow-commands-for-github-actions
|
||||||
|
- /actions/reference/environment-variables
|
||||||
changelog:
|
changelog:
|
||||||
|
- title: Removing set-env and add-path commands on November 16
|
||||||
|
date: '2020-11-09'
|
||||||
|
href: https://github.blog/changelog/2020-10-01-github-actions-deprecating-set-env-and-add-path-commands/
|
||||||
|
- title: Ubuntu-latest workflows will use Ubuntu-20.04
|
||||||
|
date: '2020-10-29'
|
||||||
|
href: https://github.blog/changelog/2020-10-29-github-actions-ubuntu-latest-workflows-will-use-ubuntu-20-04
|
||||||
|
- title: MacOS Big Sur Preview
|
||||||
|
date: '2020-10-29'
|
||||||
|
href: https://github.blog/changelog/2020-10-29-github-actions-macos-big-sur-preview
|
||||||
- title: Self-Hosted Runner Group Access Changes
|
- title: Self-Hosted Runner Group Access Changes
|
||||||
date: '2020-10-16'
|
date: '2020-10-16'
|
||||||
href: https://github.blog/changelog/2020-10-16-github-actions-self-hosted-runner-group-access-changes/
|
href: https://github.blog/changelog/2020-10-16-github-actions-self-hosted-runner-group-access-changes/
|
||||||
- title: Ability to change retention days for artifacts and logs
|
|
||||||
date: '2020-10-08'
|
|
||||||
href: https://github.blog/changelog/2020-10-08-github-actions-ability-to-change-retention-days-for-artifacts-and-logs
|
|
||||||
- title: Deprecating set-env and add-path commands
|
|
||||||
date: '2020-10-01'
|
|
||||||
href: https://github.blog/changelog/2020-10-01-github-actions-deprecating-set-env-and-add-path-commands
|
|
||||||
- title: Fine-tune access to external actions
|
|
||||||
date: '2020-10-01'
|
|
||||||
href: https://github.blog/changelog/2020-10-01-github-actions-fine-tune-access-to-external-actions
|
|
||||||
redirect_from:
|
redirect_from:
|
||||||
- /articles/automating-your-workflow-with-github-actions/
|
- /articles/automating-your-workflow-with-github-actions/
|
||||||
- /articles/customizing-your-project-with-github-actions/
|
- /articles/customizing-your-project-with-github-actions/
|
||||||
@@ -50,107 +60,26 @@ versions:
|
|||||||
<!-- {% link_with_intro /reference %} -->
|
<!-- {% link_with_intro /reference %} -->
|
||||||
|
|
||||||
<!-- Code examples -->
|
<!-- Code examples -->
|
||||||
|
{% assign actionsCodeExamples = site.data.variables.action_code_examples %}
|
||||||
|
{% if actionsCodeExamples %}
|
||||||
<div class="my-6 pt-6">
|
<div class="my-6 pt-6">
|
||||||
<h2 class="mb-2">More guides</h2>
|
<h2 class="mb-2 font-mktg h1">Code examples</h2>
|
||||||
|
|
||||||
|
<div class="pr-lg-3 mb-5 mt-3">
|
||||||
|
<input class="js-code-example-filter input-lg py-2 px-3 col-12 col-lg-8 form-control" placeholder="Search code examples" type="search" autocomplete="off" aria-label="Search code examples"/>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="d-flex flex-wrap gutter">
|
<div class="d-flex flex-wrap gutter">
|
||||||
<div class="col-12 col-lg-4 mb-4">
|
{% render 'code-example-card' for actionsCodeExamples as example %}
|
||||||
<a class="Box d-block hover-grow no-underline text-gray-dark" href="/actions/guides/building-and-testing-nodejs">
|
|
||||||
<div class="p-4">
|
|
||||||
<h4>Building and testing Node.js</h4>
|
|
||||||
<p class="mt-2 mb-4">Use GitHub Actions to power CI in your Node.js application.</p>
|
|
||||||
<div class="d-flex">
|
|
||||||
<span class="IssueLabel text-white bg-blue mr-2">JavaScript/TypeScript</span>
|
|
||||||
<span class="IssueLabel text-white bg-blue mr-2">CI</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<footer class="border-top p-4 text-gray d-flex flex-items-center">
|
|
||||||
{% octicon "workflow" class="flex-shrink-0" %}
|
|
||||||
<span class="ml-2">/guides/building-and-testing-nodejs</span>
|
|
||||||
</footer>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
<div class="col-12 col-lg-4 mb-4">
|
|
||||||
<a class="Box d-block hover-grow no-underline text-gray-dark" href="/actions/guides/building-and-testing-python">
|
|
||||||
<div class="p-4">
|
|
||||||
<h4>Building and testing Python</h4>
|
|
||||||
<p class="mt-2 mb-4">Use GitHub Actions to power CI in your Python application.</p>
|
|
||||||
<div class="d-flex">
|
|
||||||
<span class="IssueLabel text-white bg-blue mr-2">Python</span>
|
|
||||||
<span class="IssueLabel text-white bg-blue mr-2">CI</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<footer class="border-top p-4 text-gray d-flex flex-items-center">
|
|
||||||
{% octicon "workflow" class="flex-shrink-0" %}
|
|
||||||
<span class="ml-2">/guides/building-and-testing-python</span>
|
|
||||||
</footer>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
<div class="col-12 col-lg-4 mb-4">
|
|
||||||
<a class="Box d-block hover-grow no-underline text-gray-dark" href="/actions/guides/building-and-testing-java-with-maven">
|
|
||||||
<div class="p-4">
|
|
||||||
<h4>Building and testing Java with Maven</h4>
|
|
||||||
<p class="mt-2 mb-4">Use GitHub Actions to power CI in your Java project with Maven.</p>
|
|
||||||
<div class="d-flex">
|
|
||||||
<span class="IssueLabel text-white bg-blue mr-2">Java</span>
|
|
||||||
<span class="IssueLabel text-white bg-blue mr-2">CI</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<footer class="border-top p-4 text-gray d-flex flex-items-center">
|
|
||||||
{% octicon "workflow" class="flex-shrink-0" %}
|
|
||||||
<span class="ml-2">/guides/building-and-testing-java-with-maven</span>
|
|
||||||
</footer>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
<div class="col-12 col-lg-4 mb-4">
|
|
||||||
<a class="Box d-block hover-grow no-underline text-gray-dark" href="/actions/guides/building-and-testing-java-with-gradle">
|
|
||||||
<div class="p-4">
|
|
||||||
<h4>Building and testing Java with Gradle</h4>
|
|
||||||
<p class="mt-2 mb-4">Use GitHub Actions to power CI in your Java project with Gradle.</p>
|
|
||||||
<div class="d-flex">
|
|
||||||
<span class="IssueLabel text-white bg-blue mr-2">Java</span>
|
|
||||||
<span class="IssueLabel text-white bg-blue mr-2">CI</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<footer class="border-top p-4 text-gray d-flex flex-items-center">
|
|
||||||
{% octicon "workflow" class="flex-shrink-0" %}
|
|
||||||
<span class="ml-2">/guides/building-and-testing-java-with-gradle</span>
|
|
||||||
</footer>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
<div class="col-12 col-lg-4 mb-4">
|
|
||||||
<a class="Box d-block hover-grow no-underline text-gray-dark" href="/actions/guides/building-and-testing-java-with-ant">
|
|
||||||
<div class="p-4">
|
|
||||||
<h4>Building and testing Java with Ant</h4>
|
|
||||||
<p class="mt-2 mb-4">Use GitHub Actions to power CI in your Java project with Ant.</p>
|
|
||||||
<div class="d-flex">
|
|
||||||
<span class="IssueLabel text-white bg-blue mr-2">Java</span>
|
|
||||||
<span class="IssueLabel text-white bg-blue mr-2">CI</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<footer class="border-top p-4 text-gray d-flex flex-items-center">
|
|
||||||
{% octicon "workflow" class="flex-shrink-0" %}
|
|
||||||
<span class="ml-2">/guides/building-and-testing-java-with-ant</span>
|
|
||||||
</footer>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
<div class="col-12 col-lg-4 mb-4">
|
|
||||||
<a class="Box d-block hover-grow no-underline text-gray-dark" href="/actions/guides/publishing-nodejs-packages">
|
|
||||||
<div class="p-4">
|
|
||||||
<h4>Publishing Node.js packages</h4>
|
|
||||||
<p class="mt-2 mb-4">Use GitHub Actions to push your Node.js package to GitHub Packages or npm.</p>
|
|
||||||
<div class="d-flex">
|
|
||||||
<span class="IssueLabel text-white bg-blue mr-2">JavaScript/TypeScript</span>
|
|
||||||
<span class="IssueLabel text-white bg-blue mr-2">CI</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<footer class="border-top p-4 text-gray d-flex flex-items-center">
|
|
||||||
{% octicon "workflow" class="flex-shrink-0" %}
|
|
||||||
<span class="ml-2">/guides/publishing-nodejs-packages</span>
|
|
||||||
</footer>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<a href="/actions/guides" class="btn btn-outline mt-4">Show all guides {% octicon "arrow-right" %}</a>
|
<button class="js-code-example-show-more btn btn-outline float-right">Show more {% octicon "arrow-right" %}</button>
|
||||||
|
|
||||||
|
<div class="js-code-example-no-results d-none py-4 text-center text-gray font-mktg">
|
||||||
|
<div class="mb-3">{% octicon "search" width="24" %}</div>
|
||||||
|
<h3 class="text-normal">Sorry, there is no result for <strong class="js-code-example-filter-value"></strong></h3>
|
||||||
|
<p class="my-3 f4">It looks like we don't have an example that fits your filter.<br>Try another filter or add your code example</p>
|
||||||
|
<a href="https://github.com/github/docs/blob/main/data/variables/action_code_examples.yml">Learn how to add a code example {% octicon "arrow-right" %}</a>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ A job is a set of steps that execute on the same runner. By default, a workflow
|
|||||||
|
|
||||||
#### Steps
|
#### Steps
|
||||||
|
|
||||||
A step is an individual task that can run commands (known as _actions_). Each step in a job executes on the same runner, allowing the actions in that job to share data with each other.
|
A step is an individual task that can run commands in a job. A step can be either an _action_ or a shell command. Each step in a job executes on the same runner, allowing the actions in that job to share data with each other.
|
||||||
|
|
||||||
#### Actions
|
#### Actions
|
||||||
|
|
||||||
@@ -50,7 +50,7 @@ _Actions_ are standalone commands that are combined into _steps_ to create a _jo
|
|||||||
|
|
||||||
#### Runners
|
#### Runners
|
||||||
|
|
||||||
A runner is a server that has the {% data variables.product.prodname_actions %} runner application installed. You can use a runner hosted by {% data variables.product.prodname_dotcom %}, or you can host your own. A runner listens for available jobs, runs one job at a time, and reports the progress, logs, and results back to {% data variables.product.prodname_dotcom %}. For {% data variables.product.prodname_dotcom %}-hosted runners, each job in a workflow runs in a fresh virtual environment.
|
A runner is a server that has the [{% data variables.product.prodname_actions %} runner application](https://github.com/actions/runner) installed. You can use a runner hosted by {% data variables.product.prodname_dotcom %}, or you can host your own. A runner listens for available jobs, runs one job at a time, and reports the progress, logs, and results back to {% data variables.product.prodname_dotcom %}. For {% data variables.product.prodname_dotcom %}-hosted runners, each job in a workflow runs in a fresh virtual environment.
|
||||||
|
|
||||||
{% data variables.product.prodname_dotcom %}-hosted runners are based on Ubuntu Linux, Microsoft Windows, and macOS. For information on {% data variables.product.prodname_dotcom %}-hosted runners, see "[Virtual environments for {% data variables.product.prodname_dotcom %}-hosted runners](/actions/reference/virtual-environments-for-github-hosted-runners)." If you need a different operating system or require a specific hardware configuration, you can host your own runners. For information on self-hosted runners, see "[Hosting your own runners](/actions/hosting-your-own-runners)."
|
{% data variables.product.prodname_dotcom %}-hosted runners are based on Ubuntu Linux, Microsoft Windows, and macOS. For information on {% data variables.product.prodname_dotcom %}-hosted runners, see "[Virtual environments for {% data variables.product.prodname_dotcom %}-hosted runners](/actions/reference/virtual-environments-for-github-hosted-runners)." If you need a different operating system or require a specific hardware configuration, you can host your own runners. For information on self-hosted runners, see "[Hosting your own runners](/actions/hosting-your-own-runners)."
|
||||||
|
|
||||||
@@ -197,7 +197,7 @@ To help you understand how YAML syntax is used to create a workflow file, this s
|
|||||||
|
|
||||||
#### Visualizing the workflow file
|
#### Visualizing the workflow file
|
||||||
|
|
||||||
In this diagram, you can see the workflow file you just created and how the {% data variables.product.prodname_actions %} components are organized in a hierarchy. Each step executes a single action. Steps 1 and 2 use prebuilt community actions. To find more prebuilt actions for your workflows, see "[Finding and customizing actions](/actions/learn-github-actions/finding-and-customizing-actions)."
|
In this diagram, you can see the workflow file you just created and how the {% data variables.product.prodname_actions %} components are organized in a hierarchy. Each step executes a single action or shell command. Steps 1 and 2 use prebuilt community actions. Steps 3 and 4 run shell commands directly on the runner. To find more prebuilt actions for your workflows, see "[Finding and customizing actions](/actions/learn-github-actions/finding-and-customizing-actions)."
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
|||||||
@@ -106,7 +106,7 @@ jobs:
|
|||||||
```
|
```
|
||||||
{% endraw %}
|
{% endraw %}
|
||||||
|
|
||||||
For more information, see "[Caching dependencies to speed up workflows](/actions/configuring-and-managing-workflows/caching-dependencies-to-speed-up-workflows)."
|
For more information, see "<a href="/actions/guides/caching-dependencies-to-speed-up-workflows" class="dotcom-only">Caching dependencies to speed up workflows</a>."
|
||||||
|
|
||||||
### Using databases and service containers
|
### Using databases and service containers
|
||||||
|
|
||||||
|
|||||||
@@ -101,7 +101,7 @@ GitHub Actions
|
|||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
For more information, see "[Caching dependencies to speed up workflows](/actions/configuring-and-managing-workflows/caching-dependencies-to-speed-up-workflows)."
|
{% data variables.product.prodname_actions %} caching is only applicable to {% data variables.product.prodname_dotcom %}-hosted runners. For more information, see "<a href="/actions/guides/caching-dependencies-to-speed-up-workflows" class="dotcom-only">Caching dependencies to speed up workflows</a>."
|
||||||
|
|
||||||
{% data variables.product.prodname_actions %} does not have an equivalent of CircleCI’s Docker Layer Caching (or DLC).
|
{% data variables.product.prodname_actions %} does not have an equivalent of CircleCI’s Docker Layer Caching (or DLC).
|
||||||
|
|
||||||
|
|||||||
@@ -346,7 +346,7 @@ jobs:
|
|||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
For more information, see "[Caching dependencies to speed up workflows](/actions/guides/caching-dependencies-to-speed-up-workflows)."
|
{% data variables.product.prodname_actions %} caching is only applicable to {% data variables.product.prodname_dotcom %}-hosted runners. For more information, see "<a href="/actions/guides/caching-dependencies-to-speed-up-workflows" class="dotcom-only">Caching dependencies to speed up workflows</a>."
|
||||||
|
|
||||||
### Artifacts
|
### Artifacts
|
||||||
|
|
||||||
|
|||||||
@@ -164,6 +164,12 @@ git:
|
|||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
#### Using environment variables in a matrix
|
||||||
|
|
||||||
|
Travis CI and {% data variables.product.prodname_actions %} can both add custom environment variables to a test matrix, which allows you to refer to the variable in a later step.
|
||||||
|
|
||||||
|
In {% data variables.product.prodname_actions %}, you can use the `include` key to add custom environment variables to a matrix. {% data reusables.github-actions.matrix-variable-example %}
|
||||||
|
|
||||||
### Key features in {% data variables.product.prodname_actions %}
|
### Key features in {% data variables.product.prodname_actions %}
|
||||||
|
|
||||||
When migrating from Travis CI, consider the following key features in {% data variables.product.prodname_actions %}:
|
When migrating from Travis CI, consider the following key features in {% data variables.product.prodname_actions %}:
|
||||||
@@ -317,7 +323,7 @@ cache: npm
|
|||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
For more information, see "[Caching dependencies to speed up workflows](/actions/guides/caching-dependencies-to-speed-up-workflows)."
|
{% data variables.product.prodname_actions %} caching is only applicable to {% data variables.product.prodname_dotcom %}-hosted runners. For more information, see "<a href="/actions/guides/caching-dependencies-to-speed-up-workflows" class="dotcom-only">Caching dependencies to speed up workflows</a>."
|
||||||
|
|
||||||
### Examples of common tasks
|
### Examples of common tasks
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ You can see whether a workflow run is in progress or complete from the workflow
|
|||||||
|
|
||||||
If the run is complete, you can see whether the result was a success, failure, canceled, or neutral. If the run failed, you can view and search the build logs to diagnose the failure and re-run the workflow. You can also view billable job execution minutes, or download logs and build artifacts.
|
If the run is complete, you can see whether the result was a success, failure, canceled, or neutral. If the run failed, you can view and search the build logs to diagnose the failure and re-run the workflow. You can also view billable job execution minutes, or download logs and build artifacts.
|
||||||
|
|
||||||
{% data variables.product.prodname_actions %} use the Checks API to output statuses, results, and logs for a workflow. {% data variables.product.prodname_dotcom %} creates a new check suite for each workflow run. The check suite contains a check run for each job in the workflow, and each job includes steps. {% data variables.product.prodname_actions %} are run as a step in a workflow. For more information about the Checks API, see "[Checks](/v3/checks/)."
|
{% data variables.product.prodname_actions %} use the Checks API to output statuses, results, and logs for a workflow. {% data variables.product.prodname_dotcom %} creates a new check suite for each workflow run. The check suite contains a check run for each job in the workflow, and each job includes steps. {% data variables.product.prodname_actions %} are run as a step in a workflow. For more information about the Checks API, see "[Checks](/rest/reference/checks)."
|
||||||
|
|
||||||
{% data reusables.github-actions.invalid-workflow-files %}
|
{% data reusables.github-actions.invalid-workflow-files %}
|
||||||
|
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ You can use the `GITHUB_TOKEN` to make authenticated API calls. This example wor
|
|||||||
|
|
||||||
### Permissions for the `GITHUB_TOKEN`
|
### Permissions for the `GITHUB_TOKEN`
|
||||||
|
|
||||||
For information about the API endpoints {% data variables.product.prodname_github_apps %} can access with each permission, see "[{% data variables.product.prodname_github_app %} Permissions](/v3/apps/permissions/)."
|
For information about the API endpoints {% data variables.product.prodname_github_apps %} can access with each permission, see "[{% data variables.product.prodname_github_app %} Permissions](/rest/reference/permissions-required-for-github-apps)."
|
||||||
|
|
||||||
| Permission | Access type | Access by forked repos |
|
| Permission | Access type | Access by forked repos |
|
||||||
|------------|-------------|--------------------------|
|
|------------|-------------|--------------------------|
|
||||||
|
|||||||
@@ -43,11 +43,11 @@ You can use and read encrypted secrets in a workflow file if you have access to
|
|||||||
|
|
||||||
{% endwarning %}
|
{% endwarning %}
|
||||||
|
|
||||||
You can also manage secrets using the REST API. For more information, see "[Secrets](/v3/actions/secrets/)."
|
You can also manage secrets using the REST API. For more information, see "[Secrets](/rest/reference/actions#secrets)."
|
||||||
|
|
||||||
#### Limiting credential permissions
|
#### Limiting credential permissions
|
||||||
|
|
||||||
When generating credentials, we recommend that you grant the minimum permissions possible. For example, instead of using personal credentials, use [deploy keys](/v3/guides/managing-deploy-keys/#deploy-keys) or a service account. Consider granting read-only permissions if that's all that is needed, and limit access as much as possible. When generating a personal access token (PAT), select the fewest scopes necessary.
|
When generating credentials, we recommend that you grant the minimum permissions possible. For example, instead of using personal credentials, use [deploy keys](/developers/overview/managing-deploy-keys#deploy-keys) or a service account. Consider granting read-only permissions if that's all that is needed, and limit access as much as possible. When generating a personal access token (PAT), select the fewest scopes necessary.
|
||||||
|
|
||||||
### Creating encrypted secrets for a repository
|
### Creating encrypted secrets for a repository
|
||||||
|
|
||||||
|
|||||||
@@ -143,7 +143,7 @@ jobs:
|
|||||||
|
|
||||||
{% data reusables.github-actions.branch-requirement %}
|
{% data reusables.github-actions.branch-requirement %}
|
||||||
|
|
||||||
You can use the {% data variables.product.product_name %} API to trigger a webhook event called [`repository_dispatch`](/webhooks/event-payloads/#repository_dispatch) when you want to trigger a workflow for activity that happens outside of {% data variables.product.prodname_dotcom %}. For more information, see "[Create a repository dispatch event](/v3/repos/#create-a-repository-dispatch-event)."
|
You can use the {% data variables.product.product_name %} API to trigger a webhook event called [`repository_dispatch`](/webhooks/event-payloads/#repository_dispatch) when you want to trigger a workflow for activity that happens outside of {% data variables.product.prodname_dotcom %}. For more information, see "[Create a repository dispatch event](/rest/reference/repos#create-a-repository-dispatch-event)."
|
||||||
|
|
||||||
To trigger the custom `repository_dispatch` webhook event, you must send a `POST` request to a {% data variables.product.product_name %} API endpoint and provide an `event_type` name to describe the activity type. To trigger a workflow run, you must also configure your workflow to use the `repository_dispatch` event.
|
To trigger the custom `repository_dispatch` webhook event, you must send a `POST` request to a {% data variables.product.product_name %} API endpoint and provide an `event_type` name to describe the activity type. To trigger a workflow run, you must also configure your workflow to use the `repository_dispatch` event.
|
||||||
|
|
||||||
@@ -163,7 +163,7 @@ You can configure your workflow to run when webhook events are created on {% dat
|
|||||||
|
|
||||||
#### `check_run`
|
#### `check_run`
|
||||||
|
|
||||||
Runs your workflow anytime the `check_run` event occurs. {% data reusables.developer-site.multiple_activity_types %} For information about the REST API, see "[Check runs](/v3/checks/runs/)."
|
Runs your workflow anytime the `check_run` event occurs. {% data reusables.developer-site.multiple_activity_types %} For information about the REST API, see "[Check runs](/rest/reference/checks#runs)."
|
||||||
|
|
||||||
{% data reusables.github-actions.branch-requirement %}
|
{% data reusables.github-actions.branch-requirement %}
|
||||||
|
|
||||||
@@ -183,7 +183,7 @@ on:
|
|||||||
|
|
||||||
#### `check_suite`
|
#### `check_suite`
|
||||||
|
|
||||||
Runs your workflow anytime the `check_suite` event occurs. {% data reusables.developer-site.multiple_activity_types %} For information about the REST API, see "[Check suites](/v3/checks/suites/)."
|
Runs your workflow anytime the `check_suite` event occurs. {% data reusables.developer-site.multiple_activity_types %} For information about the REST API, see "[Check suites](/rest/reference/checks#suites)."
|
||||||
|
|
||||||
{% data reusables.github-actions.branch-requirement %}
|
{% data reusables.github-actions.branch-requirement %}
|
||||||
|
|
||||||
@@ -209,7 +209,7 @@ on:
|
|||||||
|
|
||||||
#### `create`
|
#### `create`
|
||||||
|
|
||||||
Runs your workflow anytime someone creates a branch or tag, which triggers the `create` event. For information about the REST API, see "[Create a reference](/v3/git/refs/#create-a-reference)."
|
Runs your workflow anytime someone creates a branch or tag, which triggers the `create` event. For information about the REST API, see "[Create a reference](/rest/reference/git#create-a-reference)."
|
||||||
|
|
||||||
| Webhook event payload | Activity types | `GITHUB_SHA` | `GITHUB_REF` |
|
| Webhook event payload | Activity types | `GITHUB_SHA` | `GITHUB_REF` |
|
||||||
| --------------------- | -------------- | ------------ | -------------|
|
| --------------------- | -------------- | ------------ | -------------|
|
||||||
@@ -224,7 +224,7 @@ on:
|
|||||||
|
|
||||||
#### `delete`
|
#### `delete`
|
||||||
|
|
||||||
Runs your workflow anytime someone deletes a branch or tag, which triggers the `delete` event. For information about the REST API, see "[Delete a reference](/v3/git/refs/#delete-a-reference)."
|
Runs your workflow anytime someone deletes a branch or tag, which triggers the `delete` event. For information about the REST API, see "[Delete a reference](/rest/reference/git#delete-a-reference)."
|
||||||
|
|
||||||
{% data reusables.github-actions.branch-requirement %}
|
{% data reusables.github-actions.branch-requirement %}
|
||||||
|
|
||||||
@@ -271,7 +271,7 @@ on:
|
|||||||
|
|
||||||
#### `fork`
|
#### `fork`
|
||||||
|
|
||||||
Runs your workflow anytime when someone forks a repository, which triggers the `fork` event. For information about the REST API, see "[Create a fork](/v3/repos/forks/#create-a-fork)."
|
Runs your workflow anytime when someone forks a repository, which triggers the `fork` event. For information about the REST API, see "[Create a fork](/rest/reference/repos#create-a-fork)."
|
||||||
|
|
||||||
{% data reusables.github-actions.branch-requirement %}
|
{% data reusables.github-actions.branch-requirement %}
|
||||||
|
|
||||||
@@ -327,6 +327,7 @@ The `issue_comment` event occurs for comments on both issues and pull requests.
|
|||||||
|
|
||||||
For example, you can choose to run the `pr_commented` job when comment events occur in a pull request, and the `issue_commented` job when comment events occur in an issue.
|
For example, you can choose to run the `pr_commented` job when comment events occur in a pull request, and the `issue_commented` job when comment events occur in an issue.
|
||||||
|
|
||||||
|
{% raw %}
|
||||||
```yaml
|
```yaml
|
||||||
on: issue_comment
|
on: issue_comment
|
||||||
|
|
||||||
@@ -349,10 +350,11 @@ jobs:
|
|||||||
- run: |
|
- run: |
|
||||||
echo "Comment on issue #${{ github.event.issue.number }}"
|
echo "Comment on issue #${{ github.event.issue.number }}"
|
||||||
```
|
```
|
||||||
|
{% endraw %}
|
||||||
|
|
||||||
#### `issues`
|
#### `issues`
|
||||||
|
|
||||||
Runs your workflow anytime the `issues` event occurs. {% data reusables.developer-site.multiple_activity_types %} For information about the REST API, see "[Issues](/v3/issues)."
|
Runs your workflow anytime the `issues` event occurs. {% data reusables.developer-site.multiple_activity_types %} For information about the REST API, see "[Issues](/rest/reference/issues)."
|
||||||
|
|
||||||
{% data reusables.github-actions.branch-requirement %}
|
{% data reusables.github-actions.branch-requirement %}
|
||||||
|
|
||||||
@@ -372,7 +374,7 @@ on:
|
|||||||
|
|
||||||
#### `label`
|
#### `label`
|
||||||
|
|
||||||
Runs your workflow anytime the `label` event occurs. {% data reusables.developer-site.multiple_activity_types %} For information about the REST API, see "[Labels](/v3/issues/labels/)."
|
Runs your workflow anytime the `label` event occurs. {% data reusables.developer-site.multiple_activity_types %} For information about the REST API, see "[Labels](/rest/reference/issues#labels)."
|
||||||
|
|
||||||
{% data reusables.github-actions.branch-requirement %}
|
{% data reusables.github-actions.branch-requirement %}
|
||||||
|
|
||||||
@@ -392,7 +394,7 @@ on:
|
|||||||
|
|
||||||
#### `milestone`
|
#### `milestone`
|
||||||
|
|
||||||
Runs your workflow anytime the `milestone` event occurs. {% data reusables.developer-site.multiple_activity_types %} For information about the REST API, see "[Milestones](/v3/issues/milestones/)."
|
Runs your workflow anytime the `milestone` event occurs. {% data reusables.developer-site.multiple_activity_types %} For information about the REST API, see "[Milestones](/rest/reference/issues#milestones)."
|
||||||
|
|
||||||
{% data reusables.github-actions.branch-requirement %}
|
{% data reusables.github-actions.branch-requirement %}
|
||||||
|
|
||||||
@@ -429,7 +431,7 @@ on:
|
|||||||
|
|
||||||
#### `project`
|
#### `project`
|
||||||
|
|
||||||
Runs your workflow anytime the `project` event occurs. {% data reusables.developer-site.multiple_activity_types %} For information about the REST API, see "[Projects](/v3/projects/)."
|
Runs your workflow anytime the `project` event occurs. {% data reusables.developer-site.multiple_activity_types %} For information about the REST API, see "[Projects](/rest/reference/projects)."
|
||||||
|
|
||||||
{% data reusables.github-actions.branch-requirement %}
|
{% data reusables.github-actions.branch-requirement %}
|
||||||
|
|
||||||
@@ -449,7 +451,7 @@ on:
|
|||||||
|
|
||||||
#### `project_card`
|
#### `project_card`
|
||||||
|
|
||||||
Runs your workflow anytime the `project_card` event occurs. {% data reusables.developer-site.multiple_activity_types %} For information about the REST API, see "[Project cards](/v3/projects/cards)."
|
Runs your workflow anytime the `project_card` event occurs. {% data reusables.developer-site.multiple_activity_types %} For information about the REST API, see "[Project cards](/rest/reference/projects#cards)."
|
||||||
|
|
||||||
{% data reusables.github-actions.branch-requirement %}
|
{% data reusables.github-actions.branch-requirement %}
|
||||||
|
|
||||||
@@ -469,7 +471,7 @@ on:
|
|||||||
|
|
||||||
#### `project_column`
|
#### `project_column`
|
||||||
|
|
||||||
Runs your workflow anytime the `project_column` event occurs. {% data reusables.developer-site.multiple_activity_types %} For information about the REST API, see "[Project columns](/v3/projects/columns)."
|
Runs your workflow anytime the `project_column` event occurs. {% data reusables.developer-site.multiple_activity_types %} For information about the REST API, see "[Project columns](/rest/reference/projects#columns)."
|
||||||
|
|
||||||
{% data reusables.github-actions.branch-requirement %}
|
{% data reusables.github-actions.branch-requirement %}
|
||||||
|
|
||||||
@@ -489,7 +491,7 @@ on:
|
|||||||
|
|
||||||
#### `public`
|
#### `public`
|
||||||
|
|
||||||
Runs your workflow anytime someone makes a private repository public, which triggers the `public` event. For information about the REST API, see "[Edit repositories](/v3/repos/#edit)."
|
Runs your workflow anytime someone makes a private repository public, which triggers the `public` event. For information about the REST API, see "[Edit repositories](/rest/reference/repos#edit)."
|
||||||
|
|
||||||
{% data reusables.github-actions.branch-requirement %}
|
{% data reusables.github-actions.branch-requirement %}
|
||||||
|
|
||||||
@@ -506,7 +508,7 @@ on:
|
|||||||
|
|
||||||
#### `pull_request`
|
#### `pull_request`
|
||||||
|
|
||||||
Runs your workflow anytime the `pull_request` event occurs. {% data reusables.developer-site.multiple_activity_types %} For information about the REST API, see "[Pull requests](/v3/pulls)."
|
Runs your workflow anytime the `pull_request` event occurs. {% data reusables.developer-site.multiple_activity_types %} For information about the REST API, see "[Pull requests](/rest/reference/pulls)."
|
||||||
|
|
||||||
{% note %}
|
{% note %}
|
||||||
|
|
||||||
@@ -532,7 +534,7 @@ on:
|
|||||||
|
|
||||||
#### `pull_request_review`
|
#### `pull_request_review`
|
||||||
|
|
||||||
Runs your workflow anytime the `pull_request_review` event occurs. {% data reusables.developer-site.multiple_activity_types %} For information about the REST API, see "[Pull request reviews](/v3/pulls/reviews)."
|
Runs your workflow anytime the `pull_request_review` event occurs. {% data reusables.developer-site.multiple_activity_types %} For information about the REST API, see "[Pull request reviews](/rest/reference/pulls#reviews)."
|
||||||
|
|
||||||
| Webhook event payload | Activity types | `GITHUB_SHA` | `GITHUB_REF` |
|
| Webhook event payload | Activity types | `GITHUB_SHA` | `GITHUB_REF` |
|
||||||
| --------------------- | -------------- | ------------ | -------------|
|
| --------------------- | -------------- | ------------ | -------------|
|
||||||
@@ -552,7 +554,7 @@ on:
|
|||||||
|
|
||||||
#### `pull_request_review_comment`
|
#### `pull_request_review_comment`
|
||||||
|
|
||||||
Runs your workflow anytime a comment on a pull request's unified diff is modified, which triggers the `pull_request_review_comment` event. {% data reusables.developer-site.multiple_activity_types %} For information about the REST API, see [Review comments](/v3/pulls/comments).
|
Runs your workflow anytime a comment on a pull request's unified diff is modified, which triggers the `pull_request_review_comment` event. {% data reusables.developer-site.multiple_activity_types %} For information about the REST API, see [Review comments](/rest/reference/pulls#comments).
|
||||||
|
|
||||||
| Webhook event payload | Activity types | `GITHUB_SHA` | `GITHUB_REF` |
|
| Webhook event payload | Activity types | `GITHUB_SHA` | `GITHUB_REF` |
|
||||||
| --------------------- | -------------- | ------------ | -------------|
|
| --------------------- | -------------- | ------------ | -------------|
|
||||||
@@ -570,6 +572,8 @@ on:
|
|||||||
|
|
||||||
{% data reusables.developer-site.pull_request_forked_repos_link %}
|
{% data reusables.developer-site.pull_request_forked_repos_link %}
|
||||||
|
|
||||||
|
{% if currentVersion == "free-pro-team@latest" or currentVersion ver_gt "enterprise-server@2.22" %}
|
||||||
|
|
||||||
#### `pull_request_target`
|
#### `pull_request_target`
|
||||||
|
|
||||||
This event is similar to `pull_request`, except that it runs in the context of the base repository of the pull request, rather than in the merge commit. This means that you can more safely make your secrets available to the workflows triggered by the pull request, because only workflows defined in the commit on the base repository are run. For example, this event allows you to create workflows that label and comment on pull requests, based on the contents of the event payload.
|
This event is similar to `pull_request`, except that it runs in the context of the base repository of the pull request, rather than in the merge commit. This means that you can more safely make your secrets available to the workflows triggered by the pull request, because only workflows defined in the commit on the base repository are run. For example, this event allows you to create workflows that label and comment on pull requests, based on the contents of the event payload.
|
||||||
@@ -587,11 +591,13 @@ on: pull_request_target
|
|||||||
types: [assigned, opened, synchronize, reopened]
|
types: [assigned, opened, synchronize, reopened]
|
||||||
```
|
```
|
||||||
|
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
#### `push`
|
#### `push`
|
||||||
|
|
||||||
{% note %}
|
{% note %}
|
||||||
|
|
||||||
**Note:** The webhook payload available to GitHub Actions does not include the `added`, `removed`, and `modified` attributes in the `commit` object. You can retrieve the full commit object using the REST API. For more information, see "[Get a single commit](/v3/repos/commits/#get-a-single-commit)"".
|
**Note:** The webhook payload available to GitHub Actions does not include the `added`, `removed`, and `modified` attributes in the `commit` object. You can retrieve the full commit object using the REST API. For more information, see "[Get a single commit](/rest/reference/repos#get-a-single-commit)"".
|
||||||
|
|
||||||
{% endnote %}
|
{% endnote %}
|
||||||
|
|
||||||
@@ -634,7 +640,7 @@ on:
|
|||||||
|
|
||||||
{% endnote %}
|
{% endnote %}
|
||||||
|
|
||||||
Runs your workflow anytime the `release` event occurs. {% data reusables.developer-site.multiple_activity_types %} For information about the REST API, see "[Releases](/v3/repos/releases/)."
|
Runs your workflow anytime the `release` event occurs. {% data reusables.developer-site.multiple_activity_types %} For information about the REST API, see "[Releases](/rest/reference/repos#releases)."
|
||||||
|
|
||||||
| Webhook event payload | Activity types | `GITHUB_SHA` | `GITHUB_REF` |
|
| Webhook event payload | Activity types | `GITHUB_SHA` | `GITHUB_REF` |
|
||||||
| --------------------- | -------------- | ------------ | -------------|
|
| --------------------- | -------------- | ------------ | -------------|
|
||||||
@@ -652,7 +658,7 @@ on:
|
|||||||
|
|
||||||
#### `status`
|
#### `status`
|
||||||
|
|
||||||
Runs your workflow anytime the status of a Git commit changes, which triggers the `status` event. For information about the REST API, see [Statuses](/v3/repos/statuses/).
|
Runs your workflow anytime the status of a Git commit changes, which triggers the `status` event. For information about the REST API, see [Statuses](/rest/reference/repos#statuses).
|
||||||
|
|
||||||
{% data reusables.github-actions.branch-requirement %}
|
{% data reusables.github-actions.branch-requirement %}
|
||||||
|
|
||||||
@@ -669,7 +675,7 @@ on:
|
|||||||
|
|
||||||
#### `watch`
|
#### `watch`
|
||||||
|
|
||||||
Runs your workflow anytime the `watch` event occurs. {% data reusables.developer-site.multiple_activity_types %} For information about the REST API, see "[Starring](/v3/activity/starring/)."
|
Runs your workflow anytime the `watch` event occurs. {% data reusables.developer-site.multiple_activity_types %} For information about the REST API, see "[Starring](/rest/reference/activity#starring)."
|
||||||
|
|
||||||
{% data reusables.github-actions.branch-requirement %}
|
{% data reusables.github-actions.branch-requirement %}
|
||||||
|
|
||||||
@@ -687,6 +693,8 @@ on:
|
|||||||
types: [started]
|
types: [started]
|
||||||
```
|
```
|
||||||
|
|
||||||
|
{% if currentVersion == "free-pro-team@latest" or currentVersion ver_gt "enterprise-server@2.22" %}
|
||||||
|
|
||||||
#### `workflow_run`
|
#### `workflow_run`
|
||||||
|
|
||||||
{% data reusables.webhooks.workflow_run_desc %}
|
{% data reusables.webhooks.workflow_run_desc %}
|
||||||
@@ -709,6 +717,8 @@ on:
|
|||||||
- requested
|
- requested
|
||||||
```
|
```
|
||||||
|
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
### Triggering new workflows using a personal access token
|
### Triggering new workflows using a personal access token
|
||||||
|
|
||||||
{% data reusables.github-actions.actions-do-not-trigger-workflows %} For more information, see "[Authenticating with the GITHUB_TOKEN](/actions/configuring-and-managing-workflows/authenticating-with-the-github_token)."
|
{% data reusables.github-actions.actions-do-not-trigger-workflows %} For more information, see "[Authenticating with the GITHUB_TOKEN](/actions/configuring-and-managing-workflows/authenticating-with-the-github_token)."
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ You can specify the runner type for each job in a workflow. Each job in a workfl
|
|||||||
|
|
||||||
{% data variables.product.prodname_dotcom %} hosts Linux and Windows runners on Standard_DS2_v2 virtual machines in Microsoft Azure with the {% data variables.product.prodname_actions %} runner application installed. The {% data variables.product.prodname_dotcom %}-hosted runner application is a fork of the Azure Pipelines Agent. Inbound ICMP packets are blocked for all Azure virtual machines, so ping or traceroute commands might not work. For more information about the Standard_DS2_v2 machine resources, see "[Dv2 and DSv2-series](https://docs.microsoft.com/azure/virtual-machines/dv2-dsv2-series#dsv2-series)" in the Microsoft Azure documentation.
|
{% data variables.product.prodname_dotcom %} hosts Linux and Windows runners on Standard_DS2_v2 virtual machines in Microsoft Azure with the {% data variables.product.prodname_actions %} runner application installed. The {% data variables.product.prodname_dotcom %}-hosted runner application is a fork of the Azure Pipelines Agent. Inbound ICMP packets are blocked for all Azure virtual machines, so ping or traceroute commands might not work. For more information about the Standard_DS2_v2 machine resources, see "[Dv2 and DSv2-series](https://docs.microsoft.com/azure/virtual-machines/dv2-dsv2-series#dsv2-series)" in the Microsoft Azure documentation.
|
||||||
|
|
||||||
{% data variables.product.prodname_dotcom %} uses [MacStadium](https://www.macstadium.com/) to host the macOS runners.
|
{% data variables.product.prodname_dotcom %} hosts macOS runners in {% data variables.product.prodname_dotcom %}'s own macOS Cloud.
|
||||||
|
|
||||||
#### Administrative privileges of {% data variables.product.prodname_dotcom %}-hosted runners
|
#### Administrative privileges of {% data variables.product.prodname_dotcom %}-hosted runners
|
||||||
|
|
||||||
|
|||||||
@@ -76,6 +76,7 @@ For more information, see:
|
|||||||
- "[Disabling or limiting {% data variables.product.prodname_actions %} for your organization](/github/setting-up-and-managing-organizations-and-teams/disabling-or-limiting-github-actions-for-your-organization)"{% if currentVersion == "free-pro-team@latest" %}
|
- "[Disabling or limiting {% data variables.product.prodname_actions %} for your organization](/github/setting-up-and-managing-organizations-and-teams/disabling-or-limiting-github-actions-for-your-organization)"{% if currentVersion == "free-pro-team@latest" %}
|
||||||
- "[Enforcing {% data variables.product.prodname_actions %} policies in your enterprise account](/github/setting-up-and-managing-your-enterprise/enforcing-github-actions-policies-in-your-enterprise-account)" for {% data variables.product.prodname_ghe_cloud %}{% endif %}
|
- "[Enforcing {% data variables.product.prodname_actions %} policies in your enterprise account](/github/setting-up-and-managing-your-enterprise/enforcing-github-actions-policies-in-your-enterprise-account)" for {% data variables.product.prodname_ghe_cloud %}{% endif %}
|
||||||
|
|
||||||
|
{% if currentVersion == "free-pro-team@latest" or currentVersion ver_gt "enterprise-server@2.22" %}
|
||||||
### Disabling and enabling workflows
|
### Disabling and enabling workflows
|
||||||
|
|
||||||
You can enable and disable individual workflows in your repository on {% data variables.product.prodname_dotcom %}.
|
You can enable and disable individual workflows in your repository on {% data variables.product.prodname_dotcom %}.
|
||||||
@@ -83,3 +84,4 @@ You can enable and disable individual workflows in your repository on {% data va
|
|||||||
{% data reusables.actions.scheduled-workflows-disabled %}
|
{% data reusables.actions.scheduled-workflows-disabled %}
|
||||||
|
|
||||||
For more information, see "[Disabling and enabling a workflow](/actions/managing-workflow-runs/disabling-and-enabling-a-workflow)."
|
For more information, see "[Disabling and enabling a workflow](/actions/managing-workflow-runs/disabling-and-enabling-a-workflow)."
|
||||||
|
{% endif %}
|
||||||
|
|||||||
@@ -227,7 +227,7 @@ Each job runs in an environment specified by `runs-on`.
|
|||||||
|
|
||||||
You can run an unlimited number of jobs as long as you are within the workflow usage limits. For more information, see "[Usage limits and billing](/actions/reference/usage-limits-billing-and-administration)" for {% data variables.product.prodname_dotcom %}-hosted runners and "[About self-hosted runners](/actions/hosting-your-own-runners/about-self-hosted-runners/#usage-limits)" for self-hosted runner usage limits.
|
You can run an unlimited number of jobs as long as you are within the workflow usage limits. For more information, see "[Usage limits and billing](/actions/reference/usage-limits-billing-and-administration)" for {% data variables.product.prodname_dotcom %}-hosted runners and "[About self-hosted runners](/actions/hosting-your-own-runners/about-self-hosted-runners/#usage-limits)" for self-hosted runner usage limits.
|
||||||
|
|
||||||
If you need to find the unique identifier of a job running in a workflow run, you can use the {% data variables.product.prodname_dotcom %} API. For more information, see "[Workflow Jobs](/v3/actions/workflow-jobs)."
|
If you need to find the unique identifier of a job running in a workflow run, you can use the {% data variables.product.prodname_dotcom %} API. For more information, see "[Workflow Jobs](/rest/reference/actions#workflow-jobs)."
|
||||||
|
|
||||||
### **`jobs.<job_id>`**
|
### **`jobs.<job_id>`**
|
||||||
|
|
||||||
@@ -446,7 +446,7 @@ steps:
|
|||||||
uses: monacorp/action-name@main
|
uses: monacorp/action-name@main
|
||||||
- name: My backup step
|
- name: My backup step
|
||||||
if: {% raw %}${{ failure() }}{% endraw %}
|
if: {% raw %}${{ failure() }}{% endraw %}
|
||||||
uses: actions/heroku@master
|
uses: actions/heroku@1.0.0
|
||||||
```
|
```
|
||||||
|
|
||||||
#### **`jobs.<job_id>.steps.name`**
|
#### **`jobs.<job_id>.steps.name`**
|
||||||
@@ -492,7 +492,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: My first step
|
- name: My first step
|
||||||
# Uses the default branch of a public repository
|
# Uses the default branch of a public repository
|
||||||
uses: actions/heroku@master
|
uses: actions/heroku@1.0.0
|
||||||
- name: My second step
|
- name: My second step
|
||||||
# Uses a specific version tag of a public repository
|
# Uses a specific version tag of a public repository
|
||||||
uses: actions/aws@v2.0.1
|
uses: actions/aws@v2.0.1
|
||||||
@@ -659,7 +659,7 @@ For built-in shell keywords, we provide the following defaults that are executed
|
|||||||
|
|
||||||
- `cmd`
|
- `cmd`
|
||||||
- There doesn't seem to be a way to fully opt into fail-fast behavior other than writing your script to check each error code and respond accordingly. Because we can't actually provide that behavior by default, you need to write this behavior into your script.
|
- There doesn't seem to be a way to fully opt into fail-fast behavior other than writing your script to check each error code and respond accordingly. Because we can't actually provide that behavior by default, you need to write this behavior into your script.
|
||||||
- `cmd.exe` will exit with the error level of the last program it executed, and it will and return the error code to the runner. This behavior is internally consistent with the previous `sh` and `pwsh` default behavior and is the `cmd.exe` default, so this behavior remains intact.
|
- `cmd.exe` will exit with the error level of the last program it executed, and it will return the error code to the runner. This behavior is internally consistent with the previous `sh` and `pwsh` default behavior and is the `cmd.exe` default, so this behavior remains intact.
|
||||||
|
|
||||||
#### **`jobs.<job_id>.steps.with`**
|
#### **`jobs.<job_id>.steps.with`**
|
||||||
|
|
||||||
@@ -718,7 +718,7 @@ steps:
|
|||||||
entrypoint: /a/different/executable
|
entrypoint: /a/different/executable
|
||||||
```
|
```
|
||||||
|
|
||||||
The `entrypoint` keyword is meant to use with Docker container actions, but you can also use it with JavaScript actions that don't define any inputs.
|
The `entrypoint` keyword is meant to be used with Docker container actions, but you can also use it with JavaScript actions that don't define any inputs.
|
||||||
|
|
||||||
#### **`jobs.<job_id>.steps.env`**
|
#### **`jobs.<job_id>.steps.env`**
|
||||||
|
|
||||||
@@ -876,6 +876,12 @@ strategy:
|
|||||||
|
|
||||||
{% endnote %}
|
{% endnote %}
|
||||||
|
|
||||||
|
##### Using environment variables in a matrix
|
||||||
|
|
||||||
|
You can add custom environment variables for each test combination by using the `include` key. You can then refer to the custom environment variables in a later step.
|
||||||
|
|
||||||
|
{% data reusables.github-actions.matrix-variable-example %}
|
||||||
|
|
||||||
### **`jobs.<job_id>.strategy.fail-fast`**
|
### **`jobs.<job_id>.strategy.fail-fast`**
|
||||||
|
|
||||||
When set to `true`, {% data variables.product.prodname_dotcom %} cancels all in-progress jobs if any `matrix` job fails. Default: `true`
|
When set to `true`, {% data variables.product.prodname_dotcom %} cancels all in-progress jobs if any `matrix` job fails. Default: `true`
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ versions:
|
|||||||
---
|
---
|
||||||
User accounts on {% data variables.product.product_location %} are preserved when you change the authentication method and users will continue to log into the same account as long as their username doesn't change.
|
User accounts on {% data variables.product.product_location %} are preserved when you change the authentication method and users will continue to log into the same account as long as their username doesn't change.
|
||||||
|
|
||||||
If the new method of authentication changes usernames, new accounts will be created. As an administrator, you can rename users through the site admin settings or by using [the User Administration API](/enterprise/{{currentVersion}}/v3/enterprise-admin/users/#rename-an-existing-user).
|
If the new method of authentication changes usernames, new accounts will be created. As an administrator, you can rename users through the site admin settings or by using [the User Administration API](/rest/reference/enterprise-admin#update-the-username-for-a-user).
|
||||||
|
|
||||||
Other issues you should take into consideration include:
|
Other issues you should take into consideration include:
|
||||||
|
|
||||||
|
|||||||
@@ -28,13 +28,7 @@ To configure authentication and user provisioning for {% data variables.product.
|
|||||||
|
|
||||||
{% if currentVersion == "github-ae@latest" %}
|
{% if currentVersion == "github-ae@latest" %}
|
||||||
|
|
||||||
1. In Azure AD, add {% data variables.product.ae_azure_ad_app_link %} to your tenant and configure single sign-on.
|
1. In Azure AD, add {% data variables.product.ae_azure_ad_app_link %} to your tenant and configure single sign-on. For more information, see [Tutorial: Azure Active Directory single sign-on (SSO) integration with {% data variables.product.prodname_ghe_managed %}](https://docs.microsoft.com/azure/active-directory/saas-apps/github-ae-tutorial) in the Microsoft Docs.
|
||||||
|
|
||||||
| Value in Azure AD | Value from {% data variables.product.prodname_ghe_managed %} |
|
|
||||||
| :- | :- |
|
|
||||||
| Identifier (Entity ID) | <code>https://<em>YOUR-GITHUB-AE-HOSTNAME</em><code> |
|
|
||||||
| Reply URL | <code>https://<em>YOUR-GITHUB-AE-HOSTNAME</em>/saml/consume</code> |
|
|
||||||
| Sign on URL | <code>https://<em>YOUR-GITHUB-AE-HOSTNAME</em>/sso</code> |
|
|
||||||
|
|
||||||
1. In {% data variables.product.prodname_ghe_managed %}, enter the details for your Azure AD tenant.
|
1. In {% data variables.product.prodname_ghe_managed %}, enter the details for your Azure AD tenant.
|
||||||
|
|
||||||
|
|||||||
@@ -38,6 +38,12 @@ After a user successfully authenticates on your IdP, the user's SAML session for
|
|||||||
|
|
||||||
{% data reusables.saml.ae-enable-saml-sso-during-bootstrapping %}
|
{% data reusables.saml.ae-enable-saml-sso-during-bootstrapping %}
|
||||||
|
|
||||||
|
The following IdPs provide documentation about configuring SAML SSO for {% data variables.product.product_name %}. If your IdP isn't listed, please contact your IdP to request support for {% data variables.product.product_name %}.
|
||||||
|
|
||||||
|
| IdP | More information |
|
||||||
|
| :- | :- |
|
||||||
|
| Azure AD | [Tutorial: Azure Active Directory single sign-on (SSO) integration with {% data variables.product.prodname_ghe_managed %}](https://docs.microsoft.com/azure/active-directory/saas-apps/github-ae-tutorial) in the Microsoft Docs |
|
||||||
|
|
||||||
During initialization for {% data variables.product.product_name %}, you must configure {% data variables.product.product_name %} as a SAML Service Provider (SP) on your IdP. You must enter several unique values on your IdP to configure {% data variables.product.product_name %} as a valid SP.
|
During initialization for {% data variables.product.product_name %}, you must configure {% data variables.product.product_name %} as a SAML Service Provider (SP) on your IdP. You must enter several unique values on your IdP to configure {% data variables.product.product_name %} as a valid SP.
|
||||||
|
|
||||||
| Value | Other names | Description | Example |
|
| Value | Other names | Description | Example |
|
||||||
|
|||||||
@@ -62,7 +62,15 @@ You must have administrative access on your IdP to configure the application for
|
|||||||

|

|
||||||
1. Click **Save**.
|
1. Click **Save**.
|
||||||

|

|
||||||
1. Configure user provisioning in the application for {% data variables.product.product_name %} on your IdP. The application on your IdP requires two values to provision or deprovision user accounts on {% data variables.product.product_location %}.
|
1. Configure user provisioning in the application for {% data variables.product.product_name %} on your IdP.
|
||||||
|
|
||||||
|
The following IdPs provide documentation about configuring provisioning for {% data variables.product.product_name %}. If your IdP isn't listed, please contact your IdP to request support for {% data variables.product.product_name %}.
|
||||||
|
|
||||||
|
| IdP | More information |
|
||||||
|
| :- | :- |
|
||||||
|
| Azure AD | [Tutorial: Configure {% data variables.product.prodname_ghe_managed %} for automatic user provisioning](https://docs.microsoft.com/azure/active-directory/saas-apps/github-ae-provisioning-tutorial) in the Microsoft Docs |
|
||||||
|
|
||||||
|
The application on your IdP requires two values to provision or deprovision user accounts on {% data variables.product.product_location %}.
|
||||||
|
|
||||||
| Value | Other names | Description | Example |
|
| Value | Other names | Description | Example |
|
||||||
| :- | :- | :- | :- |
|
| :- | :- | :- | :- |
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ Allows you to find the uuid of your node in `cluster.conf`.
|
|||||||
Allows you to exempt a list of users from API rate limits. For more information, see "[Resources in the REST API](/rest/overview/resources-in-the-rest-api#rate-limiting)."
|
Allows you to exempt a list of users from API rate limits. For more information, see "[Resources in the REST API](/rest/overview/resources-in-the-rest-api#rate-limiting)."
|
||||||
|
|
||||||
``` shell
|
``` shell
|
||||||
$ ghe-config app.github.rate_limiting_exempt_users "<em>hubot</em> <em>github-actions</em>"
|
$ ghe-config app.github.rate-limiting-exempt-users "<em>hubot</em> <em>github-actions</em>"
|
||||||
# Exempts the users hubot and github-actions from rate limits
|
# Exempts the users hubot and github-actions from rate limits
|
||||||
```
|
```
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@@ -157,7 +157,7 @@ $ ghe-es-index-status -do | column -ts,
|
|||||||
|
|
||||||
#### ghe-legacy-github-services-report
|
#### ghe-legacy-github-services-report
|
||||||
|
|
||||||
This utility lists repositories on your appliance that use {% data variables.product.prodname_dotcom %} Services, an integration method that will be discontinued on October 1, 2018. Users on your appliance may have set up {% data variables.product.prodname_dotcom %} Services to create notifications for pushes to certain repositories. For more information, see "[Announcing the deprecation of {% data variables.product.prodname_dotcom %} Services](https://developer.github.com/changes/2018-04-25-github-services-deprecation/)" on {% data variables.product.prodname_blog %} or "[Replacing {% data variables.product.prodname_dotcom %} Services](/v3/guides/replacing-github-services/)." For more information about this command or for additional options, use the `-h` flag.
|
This utility lists repositories on your appliance that use {% data variables.product.prodname_dotcom %} Services, an integration method that will be discontinued on October 1, 2018. Users on your appliance may have set up {% data variables.product.prodname_dotcom %} Services to create notifications for pushes to certain repositories. For more information, see "[Announcing the deprecation of {% data variables.product.prodname_dotcom %} Services](https://developer.github.com/changes/2018-04-25-github-services-deprecation/)" on {% data variables.product.prodname_blog %} or "[Replacing {% data variables.product.prodname_dotcom %} Services](/developers/overview/replacing-github-services)." For more information about this command or for additional options, use the `-h` flag.
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
ghe-legacy-github-services-report
|
ghe-legacy-github-services-report
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ Enabling {% data variables.product.prodname_github_connect %} also creates a {%
|
|||||||
|
|
||||||
Enabling {% data variables.product.prodname_github_connect %} will not allow {% data variables.product.prodname_dotcom_the_website %} users to make changes to {% data variables.product.prodname_ghe_server %}.
|
Enabling {% data variables.product.prodname_github_connect %} will not allow {% data variables.product.prodname_dotcom_the_website %} users to make changes to {% data variables.product.prodname_ghe_server %}.
|
||||||
|
|
||||||
For more information about managing enterprise accounts using the GraphQL API, see "[Enterprise accounts](/v4/guides/managing-enterprise-accounts)."
|
For more information about managing enterprise accounts using the GraphQL API, see "[Enterprise accounts](/graphql/guides/managing-enterprise-accounts)."
|
||||||
### Enabling {% data variables.product.prodname_github_connect %}
|
### Enabling {% data variables.product.prodname_github_connect %}
|
||||||
|
|
||||||
1. Sign in to {% data variables.product.product_location_enterprise %} and {% data variables.product.prodname_dotcom_the_website %}.
|
1. Sign in to {% data variables.product.product_location_enterprise %} and {% data variables.product.prodname_dotcom_the_website %}.
|
||||||
|
|||||||