Merge branch 'main' into jules-4170
5
.github/dependabot.yml
vendored
@@ -10,3 +10,8 @@ updates:
|
||||
directory: '/'
|
||||
schedule:
|
||||
interval: monthly
|
||||
|
||||
- package-ecosystem: 'docker'
|
||||
directory: '/'
|
||||
schedule:
|
||||
interval: monthly
|
||||
|
||||
64
.github/workflows/prod-build-deploy-azure.yml
vendored
@@ -26,9 +26,14 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 15
|
||||
env:
|
||||
IMAGE_TAG_BASE: ${{ secrets.PROD_REGISTRY_SERVER }}/${{ github.repository }}
|
||||
DOCKER_IMAGE: ${{ secrets.PROD_REGISTRY_SERVER }}/${{ github.repository }}:${{ github.sha }}
|
||||
|
||||
steps:
|
||||
- name: 'Az CLI login'
|
||||
uses: azure/login@66d2e78565ab7af265d2b627085bc34c73ce6abb
|
||||
with:
|
||||
creds: ${{ secrets.PROD_AZURE_CREDENTIALS }}
|
||||
|
||||
- name: 'Docker login'
|
||||
uses: azure/docker-login@81744f9799e7eaa418697cb168452a2882ae844a
|
||||
with:
|
||||
@@ -68,10 +73,65 @@ jobs:
|
||||
context: .
|
||||
push: true
|
||||
target: 'production_early_access'
|
||||
tags: ${{ env.IMAGE_TAG_BASE }}:${{ github.sha }}, ${{ env.IMAGE_TAG_BASE }}:production
|
||||
tags: ${{ env.DOCKER_IMAGE }}
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
|
||||
- name: 'Update docker-compose.prod.yaml template file'
|
||||
run: |
|
||||
sed 's|#{IMAGE}#|${{ env.DOCKER_IMAGE }}|g' docker-compose.prod.tmpl.yaml > docker-compose.prod.yaml
|
||||
|
||||
- name: 'Apply updated docker-compose.prod.yaml config to preview slot'
|
||||
run: |
|
||||
az webapp config container set --multicontainer-config-type COMPOSE --multicontainer-config-file docker-compose.prod.yaml --slot preview -n ghdocs-prod -g docs-prod
|
||||
|
||||
# Watch preview slot instances to see when all the instances are ready
|
||||
- name: Check that preview slot is ready
|
||||
uses: actions/github-script@2b34a689ec86a68d8ab9478298f91d5401337b7d
|
||||
env:
|
||||
CHECK_INTERVAL: 10000
|
||||
with:
|
||||
script: |
|
||||
const { execSync } = require('child_process')
|
||||
|
||||
const getStatesForSlot = (slot) => {
|
||||
return JSON.parse(
|
||||
execSync(
|
||||
`az webapp list-instances --slot ${slot} --query "[].state" -n ghdocs-prod -g docs-prod`,
|
||||
{ encoding: 'utf8' }
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
let hasStopped = false
|
||||
const waitDuration = parseInt(process.env.CHECK_INTERVAL, 10) || 10000
|
||||
async function doCheck() {
|
||||
const states = getStatesForSlot('preview')
|
||||
console.log(`Instance states:`, states)
|
||||
|
||||
// We must wait until at-least 1 instance has STOPPED to know we're looking at the "next" deployment and not the "previous" one
|
||||
// That way we don't immediately succeed just because all the previous instances were READY
|
||||
if (!hasStopped) {
|
||||
hasStopped = states.some((s) => s === 'STOPPED')
|
||||
}
|
||||
|
||||
const isAllReady = states.every((s) => s === 'READY')
|
||||
|
||||
if (hasStopped && isAllReady) {
|
||||
process.exit(0) // success
|
||||
}
|
||||
|
||||
console.log(`checking again in ${waitDuration}ms`)
|
||||
setTimeout(doCheck, waitDuration)
|
||||
}
|
||||
|
||||
doCheck()
|
||||
|
||||
# TODO - make a request to verify the preview app version aligns with *this* github action workflow commit sha
|
||||
- name: 'Swap preview slot to production'
|
||||
run: |
|
||||
az webapp deployment slot swap --slot preview --target-slot production -n ghdocs-prod -g docs-prod
|
||||
|
||||
# TODO - enable this when we disable the other production deploy
|
||||
# - name: Purge Fastly edge cache
|
||||
# env:
|
||||
|
||||
118
.github/workflows/staging-build-and-deploy-azure.yml
vendored
Normal file
@@ -0,0 +1,118 @@
|
||||
name: Staging - Azure Deploy App Service
|
||||
|
||||
# **What it does**: Build and deploy staging PRs to Azure
|
||||
# **Why we have it**: It's our new staging deployment mechanism, only applicable to docs-internal
|
||||
# **Who does it impact**: All contributors.
|
||||
|
||||
# This whole workflow is only guaranteed to be secure in the *private
|
||||
# repo* and because we repo-sync these files over the to the public one,
|
||||
# IT'S IMPORTANT THAT THIS WORKFLOW IS ONLY ENABLED IN docs-internal!
|
||||
|
||||
on:
|
||||
# The advantage of 'pull_request' over 'pull_request_target' is that we
|
||||
# can make changes to this file and test them in a pull request, instead
|
||||
# of relying on landing it in 'main' first.
|
||||
# From a security point of view, its arguably safer this way because
|
||||
# unlike 'pull_request_target', these only have secrets if the pull
|
||||
# request creator has permission to access secrets.
|
||||
pull_request:
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
deployments: write
|
||||
|
||||
# This allows one deploy workflow to interrupt another
|
||||
concurrency:
|
||||
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label }}'
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build-and-deploy:
|
||||
if: ${{ github.repository == 'github/docs-internal' }}
|
||||
name: Build and deploy image to staging App Service
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 15
|
||||
environment:
|
||||
name: staging-pr-${{ github.event.number }}
|
||||
url: ${{ steps.deploy.outputs.defaultHostName }}
|
||||
env:
|
||||
GITHUB_EVENT_NUMBER: ${{ github.event.number }}
|
||||
NONPROD_REGISTRY_USERNAME: ghdocs
|
||||
# Image tag is unique to each workflow run so that it always triggers a new deployment
|
||||
DOCKER_IMAGE: ${{ secrets.NONPROD_REGISTRY_SERVER }}/${{ github.repository }}/pr-${{ github.event.number }}:${{ github.event.pull_request.head.sha }}-${{ github.run_number }}-${{ github.run_attempt }}
|
||||
|
||||
steps:
|
||||
- name: 'Set env vars'
|
||||
id: vars
|
||||
run: |
|
||||
REPO_NAME=${GITHUB_REPOSITORY#*\/}
|
||||
echo "REPO_NAME=${REPO_NAME}" >> $GITHUB_ENV
|
||||
echo "APP_NAME=gh${REPO_NAME}-staging-${GITHUB_EVENT_NUMBER}" >> $GITHUB_ENV
|
||||
|
||||
- name: 'Az CLI login'
|
||||
uses: azure/login@66d2e78565ab7af265d2b627085bc34c73ce6abb
|
||||
with:
|
||||
creds: ${{ secrets.NONPROD_AZURE_CREDENTIALS }}
|
||||
|
||||
- name: 'Docker login'
|
||||
uses: azure/docker-login@81744f9799e7eaa418697cb168452a2882ae844a
|
||||
with:
|
||||
login-server: ${{ secrets.NONPROD_REGISTRY_SERVER }}
|
||||
username: ${{ env.NONPROD_REGISTRY_USERNAME }}
|
||||
password: ${{ secrets.NONPROD_REGISTRY_PASSWORD }}
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@94ab11c41e45d028884a99163086648e898eed25
|
||||
|
||||
- name: Check out repo
|
||||
uses: actions/checkout@1e204e9a9253d643386038d443f96446fa156a97
|
||||
with:
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
# To prevent issues with cloning early access content later
|
||||
persist-credentials: 'false'
|
||||
lfs: 'true'
|
||||
|
||||
- name: Check out LFS objects
|
||||
run: git lfs checkout
|
||||
|
||||
- name: Setup node
|
||||
uses: actions/setup-node@04c56d2f954f1e4c69436aa54cfef261a018f458
|
||||
with:
|
||||
node-version: 16.13.x
|
||||
cache: npm
|
||||
|
||||
- if: ${{ github.repository == 'github/docs-internal' }}
|
||||
name: Clone early access
|
||||
env:
|
||||
DOCUBOT_REPO_PAT: ${{ secrets.DOCUBOT_REPO_PAT }}
|
||||
GIT_BRANCH: ${{ github.event.pull_request.head.sha }}
|
||||
run: npm install dotenv && node script/early-access/clone-for-build.js
|
||||
|
||||
- name: 'Build and push image'
|
||||
uses: docker/build-push-action@a66e35b9cbcf4ad0ea91ffcaf7bbad63ad9e0229
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
target: ${{ fromJSON('["production", "production_early_access"]')[github.repository == 'github/docs-internal'] }}
|
||||
tags: ${{ env.DOCKER_IMAGE }}
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
|
||||
# Deploy ARM template is idempotent
|
||||
# Note: once the resources exist the image tag must change for a new deployment to occur (the image tag includes workflow run number, run attempt, as well as sha)
|
||||
- name: Run ARM deploy
|
||||
id: deploy
|
||||
uses: azure/arm-deploy@841b12551939c88af8f6df767c24c38a5620fd0d
|
||||
with:
|
||||
resourceGroupName: docs-nonprod
|
||||
subscriptionId: ${{ secrets.NONPROD_SUBSCRIPTION_ID }}
|
||||
template: ./staging-azure-deploy-template.json
|
||||
parameters: appName="${{ env.APP_NAME }}"
|
||||
location="East US"
|
||||
linuxFxVersion="DOCKER|${{ env.DOCKER_IMAGE }}"
|
||||
dockerRegistryUrl="https://${{ secrets.NONPROD_REGISTRY_SERVER }}"
|
||||
dockerRegistryUsername="${{ env.NONPROD_REGISTRY_USERNAME }}"
|
||||
dockerRegistryPassword="${{ secrets.NONPROD_REGISTRY_PASSWORD }}"
|
||||
|
||||
- run: echo ${{ steps.deploy.outputs.defaultHostName }}
|
||||
@@ -133,7 +133,11 @@ jobs:
|
||||
|
||||
# Delete all the big search indexes that are NOT English (`*-en-*`)
|
||||
pushd lib/search/indexes
|
||||
ls | grep -v '\-en\-' | xargs rm
|
||||
echo "BEFORE...."
|
||||
ls -l
|
||||
ls | grep -ve '\-en\b' | xargs rm
|
||||
echo "AFTER...."
|
||||
ls -l
|
||||
popd
|
||||
|
||||
# Note! Some day it would be nice to be able to delete
|
||||
|
||||
50
.github/workflows/staging-undeploy-azure.yml
vendored
Normal file
@@ -0,0 +1,50 @@
|
||||
name: Staging - Undeploy Azure PR
|
||||
|
||||
# **What it does**: To undeploy PRs from Azure staging environment, i.e. destroy the App and associated resources.
|
||||
# **Why we have it**: To save money spent on deployments for closed PRs.
|
||||
# **Who does it impact**: All contributors.
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types:
|
||||
- closed
|
||||
- locked
|
||||
|
||||
jobs:
|
||||
undeploy:
|
||||
name: Undeploy
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 5
|
||||
env:
|
||||
GITHUB_EVENT_NUMBER: ${{ github.event.number }}
|
||||
IMAGE_REPO: ${{ github.repository }}/pr-${{ github.event.number }}
|
||||
|
||||
steps:
|
||||
- name: 'Set env vars'
|
||||
id: vars
|
||||
run: |
|
||||
REPO_NAME=${GITHUB_REPOSITORY#*\/}
|
||||
echo "APP_NAME=gh${REPO_NAME}-staging-${GITHUB_EVENT_NUMBER}" >> $GITHUB_ENV
|
||||
|
||||
- name: 'Az CLI login'
|
||||
uses: azure/login@66d2e78565ab7af265d2b627085bc34c73ce6abb
|
||||
with:
|
||||
creds: ${{ secrets.NONPROD_AZURE_CREDENTIALS }}
|
||||
|
||||
# Delete web app (which will also delete the App Service plan)
|
||||
# This will succeed even if the app doesn't exist / has already been deleted
|
||||
- name: 'Delete App Service App (which will also delete the App Service plan)'
|
||||
run: |
|
||||
az webapp delete -n $APP_NAME -g docs-nonprod
|
||||
|
||||
# Untag all images under this PR's container registry repo - the container registry will automatically remove untagged images.
|
||||
# This will fail if the IMAGE_REPO doesn't exist, but we don't care
|
||||
- name: 'Untag all docker images for this PR'
|
||||
run: |
|
||||
az acr repository delete -n ghdocs --repository ${{ env.IMAGE_REPO }} -y || true
|
||||
|
||||
# Remove all deployments from this environment and remove the environment
|
||||
- uses: strumwolf/delete-deployment-environment@45c821e46baa405e25410700fe2e9643929706a0
|
||||
with:
|
||||
token: ${{ secrets.DOCUBOT_REPO_PAT }}
|
||||
environment: staging-pr-${{ github.event.number }}
|
||||
2
.github/workflows/workflow-lint.yml
vendored
@@ -30,4 +30,4 @@ jobs:
|
||||
- name: Run linter
|
||||
uses: cschleiden/actions-linter@caffd707beda4fc6083926a3dff48444bc7c24aa
|
||||
with:
|
||||
workflows: '[".github/workflows/*.yml", ".github/workflows/*.yaml", "!.github/workflows/remove-from-fr-board.yaml", "!.github/workflows/staging-deploy-pr.yml", "!.github/workflows/triage-issue-comments.yml"]'
|
||||
workflows: '[".github/workflows/*.yml", ".github/workflows/*.yaml", "!.github/workflows/remove-from-fr-board.yaml", "!.github/workflows/staging-deploy-pr.yml", "!.github/workflows/triage-issue-comments.yml", "!.github/workflows/staging-build-and-deploy-azure.yml"]'
|
||||
|
||||
29
Dockerfile
@@ -5,11 +5,15 @@
|
||||
# --------------------------------------------------------------------------------
|
||||
# BASE IMAGE
|
||||
# --------------------------------------------------------------------------------
|
||||
FROM node:16-alpine as base
|
||||
FROM node:16.13.2-alpine@sha256:f21f35732964a96306a84a8c4b5a829f6d3a0c5163237ff4b6b8b34f8d70064b as base
|
||||
|
||||
RUN apk add --no-cache make g++ git
|
||||
# This directory is owned by the node user
|
||||
ARG APP_HOME=/home/node/app
|
||||
|
||||
WORKDIR /usr/src/docs
|
||||
# Make sure we don't run anything as the root user
|
||||
USER node
|
||||
|
||||
WORKDIR $APP_HOME
|
||||
|
||||
|
||||
# ---------------
|
||||
@@ -17,8 +21,8 @@ WORKDIR /usr/src/docs
|
||||
# ---------------
|
||||
FROM base as all_deps
|
||||
|
||||
COPY .npmrc ./
|
||||
COPY package*.json ./
|
||||
COPY --chown=node:node .npmrc ./
|
||||
COPY --chown=node:node package*.json ./
|
||||
|
||||
RUN npm ci
|
||||
|
||||
@@ -59,22 +63,13 @@ RUN npm run build
|
||||
# MAIN IMAGE
|
||||
# --------------------------------------------------------------------------------
|
||||
|
||||
FROM node:16-alpine as production
|
||||
|
||||
# Let's make our home
|
||||
WORKDIR /usr/src/docs
|
||||
|
||||
# Ensure our node user owns the directory we're using
|
||||
RUN chown node:node /usr/src/docs -R
|
||||
|
||||
# This should be our normal running user
|
||||
USER node
|
||||
FROM base as production
|
||||
|
||||
# Copy just our prod dependencies
|
||||
COPY --chown=node:node --from=prod_deps /usr/src/docs/node_modules /usr/src/docs/node_modules
|
||||
COPY --chown=node:node --from=prod_deps $APP_HOME/node_modules $APP_HOME/node_modules
|
||||
|
||||
# Copy our front-end code
|
||||
COPY --chown=node:node --from=builder /usr/src/docs/.next /usr/src/docs/.next
|
||||
COPY --chown=node:node --from=builder $APP_HOME/.next $APP_HOME/.next
|
||||
|
||||
# We should always be running in production mode
|
||||
ENV NODE_ENV production
|
||||
|
||||
BIN
assets/images/azure/azure-resources-search.png
Normal file
|
After Width: | Height: | Size: 23 KiB |
BIN
assets/images/azure/azure-storage-containers.png
Normal file
|
After Width: | Height: | Size: 137 KiB |
BIN
assets/images/azure/azure-storage-permissions.png
Normal file
|
After Width: | Height: | Size: 182 KiB |
BIN
assets/images/azure/azure-storage-shared-access-tokens.png
Normal file
|
After Width: | Height: | Size: 128 KiB |
BIN
assets/images/enterprise/3.4/actions-access-settings.png
Normal file
|
After Width: | Height: | Size: 59 KiB |
BIN
assets/images/help/enterprises/audit-stream-add-azureblob.png
Normal file
|
After Width: | Height: | Size: 58 KiB |
|
Before Width: | Height: | Size: 44 KiB After Width: | Height: | Size: 105 KiB |
BIN
assets/images/help/enterprises/audit-stream-choice-azureblob.png
Normal file
|
After Width: | Height: | Size: 105 KiB |
|
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 104 KiB |
|
Before Width: | Height: | Size: 44 KiB After Width: | Height: | Size: 104 KiB |
|
Before Width: | Height: | Size: 44 KiB After Width: | Height: | Size: 104 KiB |
BIN
assets/images/help/images/workflow-dispatch-inputs.png
Normal file
|
After Width: | Height: | Size: 178 KiB |
BIN
assets/images/help/repository/actions-general-tab.png
Normal file
|
After Width: | Height: | Size: 25 KiB |
|
Before Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 40 KiB |
|
Before Width: | Height: | Size: 9.4 KiB |
|
Before Width: | Height: | Size: 4.7 KiB |
|
Before Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 40 KiB |
|
Before Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 4.8 KiB |
|
Before Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 14 KiB |
BIN
assets/images/help/saml/okta-provisioning-enable-options.png
Normal file
|
After Width: | Height: | Size: 178 KiB |
|
Before Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 26 KiB |
|
Before Width: | Height: | Size: 47 KiB |
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 93 KiB |
|
Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 72 KiB |
|
Before Width: | Height: | Size: 74 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 92 KiB |
|
Before Width: | Height: | Size: 62 KiB |
|
Before Width: | Height: | Size: 59 KiB After Width: | Height: | Size: 137 KiB |
@@ -81,23 +81,27 @@ export const DefaultLayout = (props: Props) => {
|
||||
</>
|
||||
)}
|
||||
</Head>
|
||||
|
||||
<a href="#main-content" className="sr-only">
|
||||
Skip to main content
|
||||
</a>
|
||||
<SidebarNav />
|
||||
|
||||
<main className="flex-1 min-width-0">
|
||||
<div className="flex-column">
|
||||
<Header />
|
||||
<DeprecationBanner />
|
||||
<RestRepoBanner />
|
||||
<main id="main-content">
|
||||
<DeprecationBanner />
|
||||
<RestRepoBanner />
|
||||
|
||||
{props.children}
|
||||
|
||||
<SupportSection />
|
||||
<SmallFooter />
|
||||
<ScrollButton
|
||||
className="position-fixed bottom-0 mb-4 right-0 mr-4"
|
||||
ariaLabel={t('scroll_to_top')}
|
||||
/>
|
||||
</main>
|
||||
{props.children}
|
||||
</main>
|
||||
<footer>
|
||||
<SupportSection />
|
||||
<SmallFooter />
|
||||
<ScrollButton
|
||||
className="position-fixed bottom-0 mb-4 right-0 mr-4"
|
||||
ariaLabel={t('scroll_to_top')}
|
||||
/>
|
||||
</footer>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@ import React, { useState, useEffect, useRef, ReactNode, RefObject } from 'react'
|
||||
import { useRouter } from 'next/router'
|
||||
import useSWR from 'swr'
|
||||
import cx from 'classnames'
|
||||
import { ActionList, DropdownMenu, Label, Overlay } from '@primer/components'
|
||||
import { ActionList, DropdownMenu, Flash, Label, Overlay } from '@primer/components'
|
||||
import { ItemInput } from '@primer/components/lib/ActionList/List'
|
||||
|
||||
import { useTranslation } from 'components/hooks/useTranslation'
|
||||
@@ -176,20 +176,28 @@ export function Search({
|
||||
'pt-9 color-bg-default color-shadow-medium position-absolute top-0 right-0',
|
||||
styles.resultsContainer,
|
||||
isHeaderSearch && styles.resultsContainerHeader,
|
||||
query ? 'd-block' : 'd-none',
|
||||
query && styles.resultsContainerOpen
|
||||
query || searchError ? 'd-block' : 'd-none',
|
||||
(query || searchError) && styles.resultsContainerOpen
|
||||
)}
|
||||
>
|
||||
<ShowSearchResults
|
||||
anchorRef={inputRef}
|
||||
isHeaderSearch={isHeaderSearch}
|
||||
isMobileSearch={isMobileSearch}
|
||||
isLoading={isLoading}
|
||||
results={previousResults}
|
||||
closeSearch={closeSearch}
|
||||
debug={debug}
|
||||
query={query}
|
||||
/>
|
||||
{searchError ? (
|
||||
<ShowSearchError
|
||||
error={searchError}
|
||||
isHeaderSearch={isHeaderSearch}
|
||||
isMobileSearch={isMobileSearch}
|
||||
/>
|
||||
) : (
|
||||
<ShowSearchResults
|
||||
anchorRef={inputRef}
|
||||
isHeaderSearch={isHeaderSearch}
|
||||
isMobileSearch={isMobileSearch}
|
||||
isLoading={isLoading}
|
||||
results={previousResults}
|
||||
closeSearch={closeSearch}
|
||||
debug={debug}
|
||||
query={query}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
{/* eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions */}
|
||||
<div
|
||||
@@ -274,6 +282,33 @@ function useDebounce<T>(value: T, delay?: number): [T, (value: T) => void] {
|
||||
return [debouncedValue, setDebouncedValue]
|
||||
}
|
||||
|
||||
function ShowSearchError({
|
||||
error,
|
||||
isHeaderSearch,
|
||||
isMobileSearch,
|
||||
}: {
|
||||
error: Error
|
||||
isHeaderSearch: boolean
|
||||
isMobileSearch: boolean
|
||||
}) {
|
||||
const { t } = useTranslation('search')
|
||||
return (
|
||||
<Flash
|
||||
variant="danger"
|
||||
sx={{ margin: isMobileSearch || isHeaderSearch ? '2rem 2rem 0 2em' : '1rem' }}
|
||||
>
|
||||
<p>{t('search_error')}</p>
|
||||
{process.env.NODE_ENV === 'development' && (
|
||||
<p>
|
||||
<small>
|
||||
<code>{error.toString()}</code>
|
||||
</small>
|
||||
</p>
|
||||
)}
|
||||
</Flash>
|
||||
)
|
||||
}
|
||||
|
||||
function ShowSearchResults({
|
||||
anchorRef,
|
||||
isHeaderSearch,
|
||||
|
||||
@@ -2,6 +2,10 @@
|
||||
background: linear-gradient(to top, var(--color-canvas-default), transparent);
|
||||
}
|
||||
|
||||
.removeHoverEvents {
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
/* Because of the sticky header */
|
||||
.hashAnchor {
|
||||
&:target {
|
||||
|
||||
@@ -2,7 +2,7 @@ import cx from 'classnames'
|
||||
import { useTranslation } from 'components/hooks/useTranslation'
|
||||
import { ArrowRightIcon } from '@primer/octicons-react'
|
||||
import { ActionList } from '@primer/components'
|
||||
import { useEffect, useRef, useState } from 'react'
|
||||
import { useState } from 'react'
|
||||
import { FeaturedTrack } from 'components/context/ProductGuidesContext'
|
||||
import { TruncateLines } from 'components/ui/TruncateLines'
|
||||
import slugger from 'github-slugger'
|
||||
@@ -17,15 +17,10 @@ export const LearningTrack = ({ track }: Props) => {
|
||||
const [numVisible, setNumVisible] = useState(DEFAULT_VISIBLE_GUIDES)
|
||||
const { t } = useTranslation('product_guides')
|
||||
const slug = track?.title ? slugger.slug(track?.title) : ''
|
||||
const listRef = useRef<HTMLLIElement>(null)
|
||||
const showAll = () => {
|
||||
setNumVisible(track?.guides?.length || 0)
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
if (listRef.current) listRef.current.focus()
|
||||
})
|
||||
|
||||
return (
|
||||
<div data-testid="learning-track" className="my-3 px-4 col-12 col-md-6">
|
||||
<div className="Box d-flex flex-column">
|
||||
@@ -62,7 +57,6 @@ export const LearningTrack = ({ track }: Props) => {
|
||||
return {
|
||||
renderItem: () => (
|
||||
<ActionList.Item
|
||||
ref={listRef}
|
||||
as="li"
|
||||
key={guide.href + track?.trackName}
|
||||
sx={{
|
||||
@@ -114,22 +108,29 @@ export const LearningTrack = ({ track }: Props) => {
|
||||
></ActionList>
|
||||
</div>
|
||||
)}
|
||||
{(track?.guides?.length || 0) > numVisible ? (
|
||||
{
|
||||
<button
|
||||
className="Box-footer btn-link border-top-0 position-relative text-center text-bold color-fg-accent pt-1 pb-3 col-12"
|
||||
className={
|
||||
'Box-footer btn-link border-top-0 position-relative text-center text-bold color-fg-accent pt-1 pb-3 col-12 ' +
|
||||
((track?.guides?.length || 0) <= numVisible && cx(styles.removeHoverEvents))
|
||||
}
|
||||
onClick={showAll}
|
||||
>
|
||||
<div
|
||||
className={cx('position-absolute left-0 right-0 py-5', styles.fadeBottom)}
|
||||
style={{ bottom: '50px' }}
|
||||
></div>
|
||||
<span>
|
||||
Show {(track?.guides?.length || 0) - numVisible} {t(`more_guides`)}
|
||||
</span>
|
||||
{(track?.guides?.length || 0) > numVisible ? (
|
||||
<div>
|
||||
<div
|
||||
className={cx('position-absolute left-0 right-0 py-5', styles.fadeBottom)}
|
||||
style={{ bottom: '50px' }}
|
||||
/>
|
||||
<span>
|
||||
Show {(track?.guides?.length || 0) - numVisible} {t(`more_guides`)}
|
||||
</span>
|
||||
</div>
|
||||
) : (
|
||||
<span className="color-fg-default">All guides shown</span>
|
||||
)}
|
||||
</button>
|
||||
) : (
|
||||
<div />
|
||||
)}
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
|
||||
@@ -20,10 +20,12 @@ export const GuideCards = () => {
|
||||
|
||||
return (
|
||||
<div>
|
||||
<div className="d-lg-flex gutter-lg flex-items-stretch">
|
||||
{(featuredLinks.guideCards || []).map((guide) => {
|
||||
return <GuideCard key={guide.href} guide={guide} />
|
||||
})}
|
||||
<div className="d-lg-flex flex-items-stretch">
|
||||
<ul className="d-flex flex-wrap gutter">
|
||||
{(featuredLinks.guideCards || []).map((guide) => {
|
||||
return <GuideCard key={guide.href} guide={guide} />
|
||||
})}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
{!currentCategory && hasGuidesPage && (
|
||||
|
||||
@@ -7,7 +7,7 @@ export const SmallFooter = () => {
|
||||
const router = useRouter()
|
||||
const { t } = useTranslation('footer')
|
||||
return (
|
||||
<footer className="container-xl px-3 mt-6 mb-8 px-md-6 position-relative d-flex flex-row-reverse flex-xl-row flex-wrap flex-xl-nowrap flex-justify-center flex-xl-justify-between f6 color-fg-muted">
|
||||
<div className="container-xl px-3 mt-6 mb-8 px-md-6 position-relative d-flex flex-row-reverse flex-xl-row flex-wrap flex-xl-nowrap flex-justify-center flex-xl-justify-between f6 color-fg-muted">
|
||||
<ul className="list-style-none d-flex flex-wrap col-12 flex-justify-center flex-xl-justify-between mb-2 mb-xl-0">
|
||||
<li className="mr-3 mr-xl-0">© {new Date().getFullYear()} GitHub, Inc.</li>
|
||||
<li className="mr-3 mr-xl-0">
|
||||
@@ -58,6 +58,6 @@ export const SmallFooter = () => {
|
||||
<a href="https://github.com/about">{t('company.links.about')}</a>
|
||||
</li>
|
||||
</ul>
|
||||
</footer>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
15
components/page-footer/Survey.module.scss
Normal file
@@ -0,0 +1,15 @@
|
||||
.visuallyHidden {
|
||||
opacity: 0;
|
||||
margin: -0.4em;
|
||||
}
|
||||
|
||||
.customRadio + label:before {
|
||||
content: "X";
|
||||
color: transparent;
|
||||
margin: 0px -33px 0px -17px;
|
||||
padding: 7px 20px 7px 20px;
|
||||
}
|
||||
|
||||
.customRadio:focus + label:before {
|
||||
outline: 1px auto -webkit-focus-ring-color;
|
||||
}
|
||||
@@ -6,6 +6,8 @@ import { useTranslation } from 'components/hooks/useTranslation'
|
||||
import { Link } from 'components/Link'
|
||||
import { sendEvent, EventType } from 'components/lib/events'
|
||||
|
||||
import styles from './Survey.module.scss'
|
||||
|
||||
enum ViewState {
|
||||
START = 'START',
|
||||
YES = 'YES',
|
||||
@@ -73,12 +75,12 @@ export const Survey = () => {
|
||||
{state !== ViewState.END && (
|
||||
<div className="radio-group mb-2">
|
||||
<input
|
||||
className={cx(styles.visuallyHidden, styles.customRadio)}
|
||||
id="survey-yes"
|
||||
type="radio"
|
||||
name="survey-vote"
|
||||
value="Y"
|
||||
aria-label={t`yes`}
|
||||
hidden
|
||||
onChange={vote(ViewState.YES)}
|
||||
checked={state === ViewState.YES}
|
||||
/>
|
||||
@@ -92,12 +94,12 @@ export const Survey = () => {
|
||||
<ThumbsupIcon size={16} className={state === ViewState.YES ? '' : 'color-fg-muted'} />
|
||||
</label>
|
||||
<input
|
||||
className={cx(styles.visuallyHidden, styles.customRadio)}
|
||||
id="survey-no"
|
||||
type="radio"
|
||||
name="survey-vote"
|
||||
value="N"
|
||||
aria-label={t`no`}
|
||||
hidden
|
||||
onChange={vote(ViewState.NO)}
|
||||
checked={state === ViewState.NO}
|
||||
/>
|
||||
|
||||
@@ -86,7 +86,7 @@ export const Header = () => {
|
||||
{/* mobile header */}
|
||||
<div className="d-lg-none" data-testid="mobile-header">
|
||||
<div className="d-flex flex-justify-between">
|
||||
<div className="d-flex flex-items-center" id="github-logo-mobile" role="banner">
|
||||
<div className="d-flex flex-items-center" id="github-logo-mobile">
|
||||
<Link aria-hidden="true" tabIndex={-1} href={`/${router.locale}`}>
|
||||
<MarkGithubIcon size={32} className="color-fg-default" />
|
||||
</Link>
|
||||
|
||||
@@ -2,6 +2,7 @@ import { useRouter } from 'next/router'
|
||||
import { Link } from 'components/Link'
|
||||
import { useLanguages } from 'components/context/LanguagesContext'
|
||||
import { Picker } from 'components/ui/Picker'
|
||||
import { useTranslation } from 'components/hooks/useTranslation'
|
||||
|
||||
type Props = {
|
||||
variant?: 'inline'
|
||||
@@ -13,6 +14,7 @@ export const LanguagePicker = ({ variant }: Props) => {
|
||||
const locale = router.locale || 'en'
|
||||
const langs = Object.values(languages)
|
||||
const selectedLang = languages[locale]
|
||||
const { t } = useTranslation('picker')
|
||||
|
||||
// The `router.asPath` will always be without a hash in SSR
|
||||
// So to avoid a hydraration failure on the client, we have to
|
||||
@@ -24,7 +26,7 @@ export const LanguagePicker = ({ variant }: Props) => {
|
||||
<Picker
|
||||
variant={variant}
|
||||
data-testid="language-picker"
|
||||
defaultText="Choose language"
|
||||
defaultText={t('language_picker_default_text')}
|
||||
options={langs
|
||||
.filter((lang) => !lang.wip)
|
||||
.map((lang) => ({
|
||||
|
||||
@@ -4,17 +4,19 @@ import { Link } from 'components/Link'
|
||||
import { useMainContext } from 'components/context/MainContext'
|
||||
import { LinkExternalIcon } from '@primer/octicons-react'
|
||||
import { Picker } from 'components/ui/Picker'
|
||||
import { useTranslation } from 'components/hooks/useTranslation'
|
||||
|
||||
export const ProductPicker = () => {
|
||||
const router = useRouter()
|
||||
const { activeProducts, currentProduct } = useMainContext()
|
||||
const { t } = useTranslation('picker')
|
||||
|
||||
return (
|
||||
<Picker
|
||||
variant="inline"
|
||||
data-testid="product-picker"
|
||||
data-current-product-path={currentProduct?.href}
|
||||
defaultText="All products"
|
||||
defaultText={t('product_picker_default_text')}
|
||||
options={activeProducts.map((product) => ({
|
||||
text: product.name,
|
||||
selected: product.name === currentProduct?.name,
|
||||
|
||||
@@ -15,7 +15,7 @@ export const VersionPicker = ({ variant }: Props) => {
|
||||
const router = useRouter()
|
||||
const { currentVersion } = useVersion()
|
||||
const { allVersions, page, enterpriseServerVersions } = useMainContext()
|
||||
const { t } = useTranslation('pages')
|
||||
const { t } = useTranslation(['pages', 'picker'])
|
||||
|
||||
if (page.permalinks && page.permalinks.length <= 1) {
|
||||
return null
|
||||
@@ -50,7 +50,7 @@ export const VersionPicker = ({ variant }: Props) => {
|
||||
<Picker
|
||||
variant={variant}
|
||||
data-testid="version-picker"
|
||||
defaultText="Choose version"
|
||||
defaultText={t('version_picker_default_text')}
|
||||
options={allLinks}
|
||||
/>
|
||||
)
|
||||
|
||||
@@ -16,12 +16,12 @@ export const SidebarNav = () => {
|
||||
<div
|
||||
className="d-none d-lg-block bg-primary position-sticky top-0 overflow-y-auto flex-shrink-0 pb-5 border-right"
|
||||
style={{ width: 326, height: '100vh' }}
|
||||
role="banner"
|
||||
>
|
||||
<div
|
||||
className="d-flex flex-items-center p-4 position-sticky top-0 color-bg-default"
|
||||
style={{ zIndex: 3 }}
|
||||
id="github-logo"
|
||||
role="banner"
|
||||
>
|
||||
<Link
|
||||
href={`/${router.locale}`}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import { ReactNode } from 'react'
|
||||
import cx from 'classnames'
|
||||
import { useTranslation } from 'components/hooks/useTranslation'
|
||||
|
||||
import { Details, useDetails, Text, Dropdown, Box } from '@primer/components'
|
||||
import { ChevronDownIcon } from '@primer/octicons-react'
|
||||
@@ -41,7 +40,11 @@ function PickerSummaryWrapper({ variant, children }: PickerWrapperPropsT) {
|
||||
|
||||
function PickerOptionsWrapper({ variant, children }: PickerWrapperPropsT) {
|
||||
if (variant === 'inline') {
|
||||
return <Box py="2">{children}</Box>
|
||||
return (
|
||||
<Box py="2">
|
||||
<ul>{children}</ul>
|
||||
</Box>
|
||||
)
|
||||
}
|
||||
return (
|
||||
<Dropdown.Menu direction="sw" style={{ width: 'unset' }}>
|
||||
@@ -53,7 +56,6 @@ function PickerOptionsWrapper({ variant, children }: PickerWrapperPropsT) {
|
||||
export function Picker({ variant, defaultText, options, ...restProps }: PickerPropsT) {
|
||||
const { getDetailsProps, setOpen } = useDetails({ closeOnOutsideClick: true })
|
||||
const selectedOption = options.find((option) => option.selected)
|
||||
const { t } = useTranslation(['picker', 'toggle_picker_list'])
|
||||
|
||||
return (
|
||||
<Details
|
||||
@@ -67,7 +69,7 @@ export function Picker({ variant, defaultText, options, ...restProps }: PickerPr
|
||||
<summary
|
||||
className="d-block btn btn-invisible color-fg-default"
|
||||
aria-haspopup="true"
|
||||
aria-label={t('toggle_picker_list')}
|
||||
aria-label={selectedOption?.text || defaultText}
|
||||
>
|
||||
<PickerSummaryWrapper variant={variant}>
|
||||
<Text>{selectedOption?.text || defaultText}</Text>
|
||||
|
||||
@@ -88,7 +88,7 @@ You can use the `git config` command to change the email address you associate w
|
||||
|
||||
{% data variables.product.product_name %} uses the email address set in your local Git configuration to associate commits pushed from the command line with your account on {% data variables.product.product_location %}.
|
||||
|
||||
You can change the email address associated with commits you make in a single repository. This will override your global Git config settings in this one repository, but will not affect any other repositories.
|
||||
You can change the email address associated with commits you make in a single repository. This will override your global Git configuration settings in this one repository, but will not affect any other repositories.
|
||||
|
||||
{% data reusables.command_line.open_the_multi_os_terminal %}
|
||||
2. Change the current working directory to the local repository where you want to configure the email address that you associate with your Git commits.
|
||||
|
||||
@@ -3,7 +3,7 @@ title: Managing your tab size rendering preference
|
||||
intro: You can manage the number of spaces a tab is equal to for your user account.
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghae: ghae-issue-5083
|
||||
ghae: issue-5083
|
||||
ghes: '>=3.4'
|
||||
ghec: '*'
|
||||
topics:
|
||||
|
||||
@@ -36,7 +36,7 @@ If your organization uses {% data variables.product.prodname_ghe_cloud %}, you c
|
||||
|
||||
If your organization is managed by an enterprise account, then you can view the enterprise owners who manage billing settings and policies for all of your enterprise's organizations. For more information about enterprise accounts, see "[Types of {% data variables.product.prodname_dotcom %} accounts](/get-started/learning-about-github/types-of-github-accounts)."
|
||||
|
||||
You can also view whether an enterprise owner has a specific role in the organization. Enterprise owners can also be an organization member, any other organization role, or be unaffililated with the organization.
|
||||
You can also view whether an enterprise owner has a specific role in the organization. Enterprise owners can also be an organization member, any other organization role, or be un-affililated with the organization.
|
||||
|
||||
{% note %}
|
||||
|
||||
@@ -46,7 +46,7 @@ You can also view whether an enterprise owner has a specific role in the organiz
|
||||
|
||||
| **Enterprise role** | **Organization role** | **Organization access or impact** |
|
||||
|----|----|----|----|
|
||||
| Enterprise owner | Unaffililated or no official organization role | Cannot access organization content or repositories but manages enterprise settings and policies that impact your organization. |
|
||||
| Enterprise owner | Un-affililated or no official organization role | Cannot access organization content or repositories but manages enterprise settings and policies that impact your organization. |
|
||||
| Enterprise owner | Organization owner | Able to configure organization settings and manage access to the organization's resources through teams, etc. |
|
||||
| Enterprise owner | Organization member | Able to access organization resources and content, such as repositories, without access to the organization's settings. |
|
||||
|
||||
|
||||
@@ -88,7 +88,7 @@ You can use the same commands that you use locally to build and test your code.
|
||||
|
||||
The starter workflow will run the default target specified in your _build.xml_ file. Your default target will commonly be set to build classes, run tests and package classes into their distributable format, for example, a JAR file.
|
||||
|
||||
If you use different commands to build your project, or you want to run a different target, you can specify those. For example, you may want to run the `jar` target that's configured in your _build-ci.xml_ file.
|
||||
If you use different commands to build your project, or you want to run a different target, you can specify those. For example, you may want to run the `jar` target that's configured in your `_build-ci.xml_` file.
|
||||
|
||||
{% raw %}
|
||||
```yaml{:copy}
|
||||
|
||||
@@ -35,6 +35,7 @@ We recommend that you have a basic understanding of the .NET Core SDK. For more
|
||||
To get started quickly, add the starter workflow to the `.github/workflows` directory of your repository.
|
||||
|
||||
{% raw %}
|
||||
|
||||
```yaml
|
||||
name: dotnet package
|
||||
|
||||
@@ -61,6 +62,7 @@ jobs:
|
||||
- name: Test
|
||||
run: dotnet test --no-restore --verbosity normal
|
||||
```
|
||||
|
||||
{% endraw %}
|
||||
|
||||
## Specifying a .NET version
|
||||
@@ -227,7 +229,7 @@ jobs:
|
||||
|
||||
## Publishing to package registries
|
||||
|
||||
You can configure your workflow to publish your Dotnet package to a package registry when your CI tests pass. You can use repository secrets to store any tokens or credentials needed to publish your binary. The following example creates and publishes a package to {% data variables.product.prodname_registry %} using `dotnet core cli`.
|
||||
You can configure your workflow to publish your .NET package to a package registry when your CI tests pass. You can use repository secrets to store any tokens or credentials needed to publish your binary. The following example creates and publishes a package to {% data variables.product.prodname_registry %} using `dotnet core cli`.
|
||||
|
||||
```yaml
|
||||
name: Upload dotnet package
|
||||
|
||||
@@ -189,7 +189,7 @@ steps:
|
||||
run: yarn
|
||||
```
|
||||
|
||||
Alternatively, you can pass `--frozen-lockfile` to install the versions in the *yarn.lock* file and prevent updates to the *yarn.lock* file.
|
||||
Alternatively, you can pass `--frozen-lockfile` to install the versions in the `yarn.lock` file and prevent updates to the `yarn.lock` file.
|
||||
|
||||
```yaml{:copy}
|
||||
steps:
|
||||
|
||||
@@ -26,7 +26,7 @@ topics:
|
||||
You can create actions by writing custom code that interacts with your repository in any way you'd like, including integrating with {% data variables.product.prodname_dotcom %}'s APIs and any publicly available third-party API. For example, an action can publish npm modules, send SMS alerts when urgent issues are created, or deploy production-ready code.
|
||||
|
||||
{% ifversion fpt or ghec %}
|
||||
You can write your own actions to use in your workflow or share the actions you build with the {% data variables.product.prodname_dotcom %} community. To share actions you've built, your repository must be public.
|
||||
You can write your own actions to use in your workflow or share the actions you build with the {% data variables.product.prodname_dotcom %} community. To share actions you've built with everyone, your repository must be public. {% if internal-actions %}To share actions only within your enterprise, your repository must be internal.{% endif %}
|
||||
{% endif %}
|
||||
|
||||
Actions can run directly on a machine or in a Docker container. You can define an action's inputs, outputs, and environment variables.
|
||||
@@ -69,7 +69,10 @@ If you're developing an action for other people to use, we recommend keeping the
|
||||
Storing an action in its own repository makes it easier for the {% data variables.product.prodname_dotcom %} community to discover the action, narrows the scope of the code base for developers fixing issues and extending the action, and decouples the action's versioning from the versioning of other application code.
|
||||
{% endif %}
|
||||
|
||||
{% ifversion fpt or ghec %}If you're building an action that you don't plan to make available to the public, you {% else %} You{% endif %} can store the action's files in any location in your repository. If you plan to combine action, workflow, and application code in a single repository, we recommend storing actions in the `.github` directory. For example, `.github/actions/action-a` and `.github/actions/action-b`.
|
||||
{% data reusables.actions.internal-actions-summary %}
|
||||
|
||||
{% ifversion fpt or ghec %}If you're building an action that you don't plan to make available to others, you {% else %} You{% endif %} can store the action's files in any location in your repository. If you plan to combine action, workflow, and application code in a single repository, we recommend storing actions in the `.github` directory. For example, `.github/actions/action-a` and `.github/actions/action-b`.
|
||||
|
||||
|
||||
## Compatibility with {% data variables.product.prodname_ghe_server %}
|
||||
|
||||
|
||||
@@ -21,6 +21,7 @@ children:
|
||||
- /dockerfile-support-for-github-actions
|
||||
- /setting-exit-codes-for-actions
|
||||
- /publishing-actions-in-github-marketplace
|
||||
- /sharing-actions-and-workflows-with-your-enterprise
|
||||
- /releasing-and-maintaining-actions
|
||||
- /developing-a-third-party-cli-action
|
||||
---
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
---
|
||||
title: Sharing actions and workflows with your enterprise
|
||||
intro: 'You can share an action or workflow with your enterprise without publishing the action or workflow publicly.'
|
||||
versions:
|
||||
feature: 'internal-actions'
|
||||
type: tutorial
|
||||
topics:
|
||||
- Actions
|
||||
- Action development
|
||||
shortTitle: Share with your enterprise
|
||||
---
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note:** Allowing workflows to access actions in internal repositories is currently in beta and subject to change.
|
||||
|
||||
{% endnote %}
|
||||
|
||||
## About {% data variables.product.prodname_actions %} access to internal repositories
|
||||
|
||||
If your organization is owned by an enterprise account, you can share actions and workflows within your enterprise, without publishing the action or workflow publicly, by allowing {% data variables.product.prodname_actions %} workflows to access an internal repository that contains the action or workflow.
|
||||
|
||||
Any actions or workflows stored in the internal repository can be used in workflows defined in other private and internal repositories owned by the same organization, or by any organization owned by the enterprise. Actions and workflows stored in internal repositories cannot be used in public repositories.
|
||||
|
||||
{% warning %}
|
||||
|
||||
**Warning**: {% data reusables.actions.outside-collaborators-internal-actions %}
|
||||
|
||||
{% endwarning %}
|
||||
|
||||
## Sharing actions and workflows with your enterprise
|
||||
|
||||
1. Store the action or workflow in an internal repository. For more information, see "[About repositories](/repositories/creating-and-managing-repositories/about-repositories#about-internal-repositories)."
|
||||
1. Configure the repository to allow access to workflows in other private and internal repositories. For more information, see "[Managing {% data variables.product.prodname_actions %} settings for a repository](/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#allowing-access-to-components-in-an-internal-repository)."
|
||||
|
||||
## Further reading
|
||||
|
||||
- "[About enterprise accounts](/admin/overview/about-enterprise-accounts)"
|
||||
- "[Reusing workflows](/actions/using-workflows/reusing-workflows)"
|
||||
@@ -124,19 +124,21 @@ jobs:
|
||||
tags: ghcr.io/{% raw %}${{ env.REPO }}{% endraw %}:{% raw %}${{ github.sha }}{% endraw %}
|
||||
file: ./Dockerfile
|
||||
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
environment:
|
||||
name: 'production'
|
||||
url: {% raw %}${{ steps.deploy-to-webapp.outputs.webapp-url }}{% endraw %}
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Lowercase the repo name
|
||||
run: echo "REPO=${GITHUB_REPOSITORY,,}" >>${GITHUB_ENV}
|
||||
needs: build
|
||||
|
||||
- name: Deploy to Azure Web App
|
||||
id: deploy-to-webapp
|
||||
environment:
|
||||
name: 'production'
|
||||
url: {% raw %}${{ steps.deploy-to-webapp.outputs.webapp-url }}{% endraw %}
|
||||
|
||||
steps:
|
||||
- name: Lowercase the repo name
|
||||
run: echo "REPO=${GITHUB_REPOSITORY,,}" >>${GITHUB_ENV}
|
||||
|
||||
- name: Deploy to Azure Web App
|
||||
id: deploy-to-webapp
|
||||
uses: azure/webapps-deploy@0b651ed7546ecfc75024011f76944cb9b381ef1e
|
||||
with:
|
||||
app-name: {% raw %}${{ env.AZURE_WEBAPP_NAME }}{% endraw %}
|
||||
|
||||
@@ -44,7 +44,7 @@ Once you've completed the prerequisites, you can proceed with creating the workf
|
||||
|
||||
The following example workflow demonstrates how to build and deploy a project to Azure Kubernetes Service when code is pushed to your repository.
|
||||
|
||||
Under the workflow `env` key, change the the following values:
|
||||
Under the workflow `env` key, change the following values:
|
||||
- `AZURE_CONTAINER_REGISTRY` to the name of your container registry
|
||||
- `PROJECT_NAME` to the name of your project
|
||||
- `RESOURCE_GROUP` to the resource group containing your AKS cluster
|
||||
|
||||
@@ -114,7 +114,7 @@ This procedure demonstrates how to create the service account for your GKE integ
|
||||
Store the name of your project as a secret named `GKE_PROJECT`. For more information about how to store a secret, see "[Encrypted secrets](/actions/security-guides/encrypted-secrets)."
|
||||
|
||||
### (Optional) Configuring kustomize
|
||||
Kustomize is an optional tool used for managing YAML specs. After creating a _kustomization_ file, the workflow below can be used to dynamically set fields of the image and pipe in the result to `kubectl`. For more information, see [kustomize usage](https://github.com/kubernetes-sigs/kustomize#usage).
|
||||
Kustomize is an optional tool used for managing YAML specs. After creating a `kustomization` file, the workflow below can be used to dynamically set fields of the image and pipe in the result to `kubectl`. For more information, see [kustomize usage](https://github.com/kubernetes-sigs/kustomize#usage).
|
||||
|
||||
{% ifversion fpt or ghes > 3.0 or ghae or ghec %}
|
||||
### (Optional) Configure a deployment environment
|
||||
|
||||
@@ -19,7 +19,7 @@ topics:
|
||||
|
||||
OpenID Connect (OIDC) allows your {% data variables.product.prodname_actions %} workflows to authenticate with a HashiCorp Vault to retrieve secrets.
|
||||
|
||||
This guide gives an overview of how to configure HashiCorp Vault to trust {% data variables.product.prodname_dotcom %}'s OIDC as a federated identity, and demonstrates how to use this configuration in [`hashicorp/vault-action`](https://github.com/hashicorp/vault-action) to retrieve secrets from HashiCorp Vault.
|
||||
This guide gives an overview of how to configure HashiCorp Vault to trust {% data variables.product.prodname_dotcom %}'s OIDC as a federated identity, and demonstrates how to use this configuration in the [hashicorp/vault-action](https://github.com/hashicorp/vault-action) action to retrieve secrets from HashiCorp Vault.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
|
||||
@@ -36,13 +36,13 @@ shortTitle: Monitor & troubleshoot
|
||||
|
||||
## Reviewing the self-hosted runner application log files
|
||||
|
||||
You can monitor the status of the self-hosted runner application and its activities. Log files are kept in the `_diag` directory, and a new one is generated each time the application is started. The filename begins with *Runner_*, and is followed by a UTC timestamp of when the application was started.
|
||||
You can monitor the status of the self-hosted runner application and its activities. Log files are kept in the `_diag` directory where you installed the runner application, and a new log is generated each time the application is started. The filename begins with *Runner_*, and is followed by a UTC timestamp of when the application was started.
|
||||
|
||||
For detailed logs on workflow job executions, see the next section describing the *Worker_* files.
|
||||
|
||||
## Reviewing a job's log file
|
||||
|
||||
The self-hosted runner application creates a detailed log file for each job that it processes. These files are stored in the `_diag` directory, and the filename begins with *Worker_*.
|
||||
The self-hosted runner application creates a detailed log file for each job that it processes. These files are stored in the `_diag` directory where you installed the runner application, and the filename begins with *Worker_*.
|
||||
|
||||
{% linux %}
|
||||
|
||||
@@ -80,14 +80,14 @@ Feb 11 16:06:54 runner01 runsvc.sh[962]: 2020-02-11 16:06:54Z: Running job: test
|
||||
Feb 11 16:07:10 runner01 runsvc.sh[962]: 2020-02-11 16:07:10Z: Job testAction completed with result: Succeeded
|
||||
```
|
||||
|
||||
To view the systemd configuration, you can locate the service file here: `/etc/systemd/system/actions.runner.<org>-<repo>.<runnerName>.service`.
|
||||
To view the `systemd` configuration, you can locate the service file here: `/etc/systemd/system/actions.runner.<org>-<repo>.<runnerName>.service`.
|
||||
If you want to customize the self-hosted runner application service, do not directly modify this file. Follow the instructions described in "[Configuring the self-hosted runner application as a service](/actions/hosting-your-own-runners/configuring-the-self-hosted-runner-application-as-a-service#customizing-the-self-hosted-runner-service)."
|
||||
|
||||
{% endlinux %}
|
||||
|
||||
{% mac %}
|
||||
|
||||
## Using launchd to check the self-hosted runner application service
|
||||
## Using `launchd` to check the self-hosted runner application service
|
||||
|
||||
For macOS-based self-hosted runners running the application as a service, you can use `launchctl` to monitor their real-time activity. The default launchd-based service uses the following naming convention: `actions.runner.<org>-<repo>.<runnerName>`. This name is truncated if it exceeds 80 characters, so the preferred way of finding the service's name is by checking the _.service_ file in the runner directory:
|
||||
|
||||
@@ -106,9 +106,9 @@ Started:
|
||||
379 0 actions.runner.example.runner01
|
||||
```
|
||||
|
||||
The resulting output includes the process ID and the name of the application’s launchd service.
|
||||
The resulting output includes the process ID and the name of the application’s `launchd` service.
|
||||
|
||||
To view the launchd configuration, you can locate the service file here: `/Users/exampleUsername/Library/LaunchAgents/actions.runner.<repoName>.<runnerName>.service`.
|
||||
To view the `launchd` configuration, you can locate the service file here: `/Users/exampleUsername/Library/LaunchAgents/actions.runner.<repoName>.<runnerName>.service`.
|
||||
If you want to customize the self-hosted runner application service, do not directly modify this file. Follow the instructions described in "[Configuring the self-hosted runner application as a service](/actions/hosting-your-own-runners/configuring-the-self-hosted-runner-application-as-a-service#customizing-the-self-hosted-runner-service-1)."
|
||||
|
||||
{% endmac %}
|
||||
@@ -163,7 +163,7 @@ You can view the update activities in the *Runner_* log files. For example:
|
||||
[Feb 12 12:37:07 INFO SelfUpdater] An update is available.
|
||||
```
|
||||
|
||||
In addition, you can find more information in the _SelfUpdate_ log files located in the `_diag` directory.
|
||||
In addition, you can find more information in the _SelfUpdate_ log files located in the `_diag` directory where you installed the runner application.
|
||||
|
||||
{% linux %}
|
||||
|
||||
@@ -196,7 +196,7 @@ If your job fails with the following error:
|
||||
dial unix /var/run/docker.sock: connect: permission denied
|
||||
```
|
||||
|
||||
Check that the self-hosted runner's service account has permission to use the Docker service. You can identify this account by checking the configuration of the self-hosted runner in systemd. For example:
|
||||
Check that the self-hosted runner's service account has permission to use the Docker service. You can identify this account by checking the configuration of the self-hosted runner in `systemd`. For example:
|
||||
|
||||
```shell
|
||||
$ sudo systemctl show -p User actions.runner.octo-org-octo-repo.runner01.service
|
||||
|
||||
@@ -24,9 +24,14 @@ featuredLinks:
|
||||
- /actions/learn-github-actions/expressions
|
||||
- /actions/learn-github-actions/environment-variables
|
||||
- /actions/security-guides/encrypted-secrets
|
||||
changelog:
|
||||
label: actions
|
||||
prefix: 'GitHub Actions: '
|
||||
videos:
|
||||
- title: "Inside GitHub: How we use GitHub Actions – Brian Douglas"
|
||||
href: 'https://www.youtube-nocookie.com/embed/MW0V5Q9WJu4'
|
||||
- title: "Advanced GitHub Actions – Jennifer Schelkopf"
|
||||
href: 'https://www.youtube-nocookie.com/embed/wWOH44Lscoc'
|
||||
- title: "GitHub Actions in action – Karan MV"
|
||||
href: 'https://www.youtube-nocookie.com/embed/4SWO0Pc76CU'
|
||||
videosHeading: GitHub Universe 2021 videos
|
||||
examples_source: data/product-examples/actions/code-examples.yml
|
||||
product_video: 'https://www.youtube-nocookie.com/embed/cP0I9w2coGU'
|
||||
redirect_from:
|
||||
|
||||
@@ -18,83 +18,188 @@ versions:
|
||||
|
||||
## About environment variables
|
||||
|
||||
{% data variables.product.prodname_dotcom %} sets default environment variables that are available to every step in a workflow run. Environment variables are case-sensitive. Commands run in actions or steps can create, read, and modify environment variables.
|
||||
You can use environment variables to store information that you want to reference in your workflow. You reference environment variables within a workflow step or an action, and the variables are interpolated on the runner machine that runs your workflow. Commands that run in actions or workflow steps can create, read, and modify environment variables.
|
||||
|
||||
To set custom environment variables, you need to specify the variables in the workflow file. You can define environment variables for a step, job, or entire workflow using the [`jobs.<job_id>.steps[*].env`](/github/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idstepsenv), [`jobs.<job_id>.env`](/github/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idenv), and [`env`](/github/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#env) keywords. For more information, see "[Workflow syntax for {% data variables.product.prodname_dotcom %}](/articles/workflow-syntax-for-github-actions/#jobsjob_idstepsenv)."
|
||||
You can set your own custom environment variables, you can use the default environment variables that {% data variables.product.prodname_dotcom %} sets automatically, and you can also use any other environment variables that are set in the working environment on the runner. Environment variables are case-sensitive.
|
||||
|
||||
To set a custom environment variable, you must define it in the workflow file. The scope of a custom environment variable is limited to the element in which it is defined. You can define environment variables that are scoped for:
|
||||
|
||||
* The entire workflow, by using [`env`](/actions/using-workflows/workflow-syntax-for-github-actions#env) at the top level of the workflow file.
|
||||
* The contents of a job within a workflow, by using [`jobs.<job_id>.env`](/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idenv).
|
||||
* A specific step within a job, by using [`jobs.<job_id>.steps[*].env`](/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsenv).
|
||||
|
||||
{% raw %}
|
||||
```yaml
|
||||
name: Greeting on variable day
|
||||
|
||||
on:
|
||||
workflow_dispatch
|
||||
|
||||
env:
|
||||
DAY_OF_WEEK: Monday
|
||||
|
||||
jobs:
|
||||
weekday_job:
|
||||
greeting_job:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
DAY_OF_WEEK: Mon
|
||||
Greeting: Hello
|
||||
steps:
|
||||
- name: "Hello world when it's Monday"
|
||||
if: ${{ env.DAY_OF_WEEK == 'Mon' }}
|
||||
run: echo "Hello $FIRST_NAME $middle_name $Last_Name, today is Monday!"
|
||||
- name: "Say Hello Mona it's Monday"
|
||||
run: echo "$Greeting $First_Name. Today is $DAY_OF_WEEK!"
|
||||
env:
|
||||
FIRST_NAME: Mona
|
||||
middle_name: The
|
||||
Last_Name: Octocat
|
||||
First_Name: Mona
|
||||
```
|
||||
{% endraw %}
|
||||
|
||||
To use the value of an environment variable in a workflow file, you should use the [`env` context](/actions/reference/context-and-expression-syntax-for-github-actions#env-context). If you want to use the value of an environment variable inside a runner, you can use the runner operating system's normal method for reading environment variables.
|
||||
The example above shows three custom environment variables being used in an `echo` command: `$DAY_OF_WEEK`, `$Greeting`, and `$First_Name`. The values for these environment variables are set, and scoped, at the workflow, job, and step level respectively.
|
||||
|
||||
If you use the workflow file's `run` key to read environment variables from within the runner operating system (as shown in the example above), the variable is substituted in the runner operating system after the job is sent to the runner. For other parts of a workflow file, you must use the `env` context to read environment variables; this is because workflow keys (such as `if`) require the variable to be substituted during workflow processing before it is sent to the runner.
|
||||
Because environment variable interpolation is done after a workflow job is sent to a runner machine, you must use the appropriate syntax for the shell that's used on the runner. In this example, the workflow specifies `ubuntu-latest`. By default, Linux runners use the bash shell, so you must use the syntax `$NAME`. If the workflow specified a Windows runner, you would use the syntax for PowerShell, `$env:NAME`. For more information about shells, see "[Workflow syntax for {% data variables.product.prodname_actions %}](/actions/learn-github-actions/workflow-syntax-for-github-actions#jobsjob_idstepsshell)."
|
||||
|
||||
You can also use the `GITHUB_ENV` environment file to set an environment variable that the following steps in a job can use. The environment file can be used directly by an action or as a shell command in a workflow file using the `run` keyword. For more information, see "[Workflow commands for {% data variables.product.prodname_actions %}](/actions/reference/workflow-commands-for-github-actions/#setting-an-environment-variable)."
|
||||
{% note %}
|
||||
|
||||
**Note**: You can list the entire set of environment variables that are available to a workflow step by using <span style="white-space: nowrap;">`run: env`</span> in a step and then examining the output for the step.
|
||||
|
||||
{% endnote %}
|
||||
|
||||
## Using contexts to access environment variable values
|
||||
|
||||
In addition to environment variables, {% data variables.product.prodname_actions %} also allows you to set and read values using contexts. Environment variables and contexts are intended for use at different points in the workflow.
|
||||
|
||||
Environment variables are always interpolated on the virtual machine runner. However, parts of a workflow are processed by {% data variables.product.prodname_actions %} and are not sent to the runner. You cannot use environment variables in these parts of a workflow file. Instead, you can use contexts. For example, an `if` conditional, which determines whether a job or step is sent to the runner, is always processed by {% data variables.product.prodname_actions %}. You can use a context in an `if` conditional statement to access the value of an environment variable.
|
||||
|
||||
{% raw %}
|
||||
```yaml
|
||||
env:
|
||||
DAY_OF_WEEK: Monday
|
||||
|
||||
jobs:
|
||||
greeting_job:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
Greeting: Hello
|
||||
steps:
|
||||
- name: "Say Hello Mona it's Monday"
|
||||
if: ${{ env.DAY_OF_WEEK == 'Monday' }}
|
||||
run: echo "$Greeting $First_Name. Today is $DAY_OF_WEEK!"
|
||||
env:
|
||||
First_Name: Mona
|
||||
```
|
||||
{% endraw %}
|
||||
|
||||
In this modification of the first example, we've introduced an `if` conditional. The workflow step is now only run if `DAYS_OF_WEEK` is set to "Monday". We access this value from the `if` conditional statement by using the [`env` context](/actions/learn-github-actions/contexts#env-context).
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note**: Contexts are usually denoted using the dollar sign and curly braces, as {% raw %}`${{ context.property }}`{% endraw %}. In an `if` conditional, the {% raw %}`${{` and `}}`{% endraw %} are optional, but if you use them they must enclose the entire comparison statement, as shown above.
|
||||
|
||||
{% endnote %}
|
||||
|
||||
You will commonly use either the `env` or `github` context to access environment variable values in parts of the workflow that are processed before jobs are sent to runners.
|
||||
|
||||
|
||||
| Context | Use case | Example |
|
||||
| --- | --- | --- |
|
||||
| `env` | Reference custom environment variables defined in the workflow. | <span style="white-space: nowrap;">{% raw %}`${{ env.MY_VARIABLE }}`{% endraw %}</span> |
|
||||
| `github` | Reference information about the workflow run and the event that triggered the run. | <span style="white-space: nowrap;">{% raw %}`${{ github.repository }}`{% endraw %}</span> |
|
||||
|
||||
|
||||
|
||||
There are many other contexts that you can use for a variety of purposes in your workflows. For more information, see "[Contexts](/actions/learn-github-actions/contexts)." For details of where you can use specific contexts within a workflow, see "[Context availability](/actions/learn-github-actions/contexts#context-availability)."
|
||||
|
||||
### Other types of variables
|
||||
|
||||
In most places in a workflow, the only types of variables that you can use are either environment variables, such as `$MY_VARIABLE`, or the equivalent context property, such as <span style="white-space: nowrap;">{% raw %}`${{ env.MY_VARIABLE }}`{% endraw %}</span>. Exceptions are:
|
||||
|
||||
* Inputs for the `workflow_call` and `workflow_dispatch` events, which allow you to pass values to a workflow. For more information, see [`on.workflow_call.inputs`](/actions/learn-github-actions/workflow-syntax-for-github-actions#onworkflow_callinputs) and [`on.workflow_dispatch.inputs`](/actions/learn-github-actions/workflow-syntax-for-github-actions#onworkflow_dispatchinputs).
|
||||
* Job outputs, which allow you to pass values between jobs in a workflow. For more information, see [`jobs.<job_id>.outputs`](/actions/learn-github-actions/workflow-syntax-for-github-actions#jobsjob_idoutputs).
|
||||
* The variables in a format expression, which allow you to replace parts of a string. For more information, see [`format`](/actions/learn-github-actions/expressions#format).
|
||||
|
||||
## Naming conventions for environment variables
|
||||
|
||||
When you set a custom environment variable, you cannot use any of the default environment variable names. For a complete list of these, see "[Default environment variables](#default-environment-variables)" below. If you attempt to override the value of one of these default environment variables, the assignment is ignored.
|
||||
|
||||
Any new environment variables you set that point to a location on the filesystem should have a `_PATH` suffix. The `HOME`, `GITHUB_ENV`, and `GITHUB_WORKSPACE` default environment variables are exceptions to this convention.
|
||||
|
||||
## Default environment variables
|
||||
|
||||
The default environment variables that {% data variables.product.prodname_dotcom %} sets are available to every step in a workflow.
|
||||
|
||||
We strongly recommend that actions use environment variables to access the filesystem rather than using hardcoded file paths. {% data variables.product.prodname_dotcom %} sets environment variables for actions to use in all runner environments.
|
||||
|
||||
| Environment variable | Description |
|
||||
| ---------------------|------------ |
|
||||
| `CI` | Always set to `true`. |
|
||||
| `GITHUB_WORKFLOW` | The name of the workflow. |
|
||||
| `GITHUB_RUN_ID` | {% data reusables.github-actions.run_id_description %} |
|
||||
| `GITHUB_RUN_NUMBER` | {% data reusables.github-actions.run_number_description %} |
|
||||
| `GITHUB_JOB` | The [job_id](/actions/reference/workflow-syntax-for-github-actions#jobsjob_id) of the current job. |
|
||||
| `GITHUB_ACTION` | The unique identifier (`id`) of the action. |
|
||||
| `GITHUB_ACTION_PATH` | The path where your action is located. You can use this path to access files located in the same repository as your action. This variable is only supported in composite actions. |
|
||||
| `GITHUB_ACTION` | The name of the action currently running, or the [`id`](/actions/learn-github-actions/workflow-syntax-for-github-actions#jobsjob_idstepsid) of a step. For example, for an action, `__repo-owner_name-of-action-repo`.<br><br>{% data variables.product.prodname_dotcom %} removes special characters, and uses the name `__run` when the current step runs a script without an `id`. If you use the same script or action more than once in the same job, the name will include a suffix that consists of the sequence number preceded by an underscore. For example, the first script you run will have the name `__run`, and the second script will be named `__run_2`. Similarly, the second invocation of `actions/checkout` will be `actionscheckout2`. |
|
||||
| `GITHUB_ACTION_PATH` | The path where an action is located. This property is only supported in composite actions. You can use this path to access files located in the same repository as the action. For example, `/home/runner/work/_actions/repo-owner/name-of-action-repo/v1`. |
|
||||
| `GITHUB_ACTION_REPOSITORY` | For a step executing an action, this is the owner and repository name of the action. For example, `actions/checkout`. |
|
||||
| `GITHUB_ACTIONS` | Always set to `true` when {% data variables.product.prodname_actions %} is running the workflow. You can use this variable to differentiate when tests are being run locally or by {% data variables.product.prodname_actions %}.
|
||||
| `GITHUB_ACTOR` | The name of the person or app that initiated the workflow. For example, `octocat`. |
|
||||
| `GITHUB_REPOSITORY` | The owner and repository name. For example, `octocat/Hello-World`. |
|
||||
| `GITHUB_EVENT_NAME` | The name of the webhook event that triggered the workflow. |
|
||||
| `GITHUB_EVENT_PATH` | The path of the file with the complete webhook event payload. For example, `/github/workflow/event.json`. |
|
||||
| `GITHUB_WORKSPACE` | The {% data variables.product.prodname_dotcom %} workspace directory path, initially empty. For example, `/home/runner/work/my-repo-name/my-repo-name`. The [actions/checkout](https://github.com/actions/checkout) action will check out files, by default a copy of your repository, within this directory. |
|
||||
| `GITHUB_SHA` | The commit SHA that triggered the workflow. For example, `ffac537e6cbbf934b08745a378932722df287a53`. |
|
||||
| `GITHUB_REF` | The branch or tag ref that triggered the workflow. For example, `refs/heads/feature-branch-1`. If neither a branch or tag is available for the event type, the variable will not exist. |
|
||||
| `GITHUB_API_URL` | Returns the API URL. For example: `{% data variables.product.api_url_code %}`.
|
||||
| `GITHUB_BASE_REF` | The name of the base ref or target branch of the pull request in a workflow run. This is only set when the event that triggers a workflow run is either `pull_request` or `pull_request_target`. For example, `main`. |
|
||||
| `GITHUB_ENV` | The path on the runner to the file that sets environment variables from workflow commands. This file is unique to the current step and changes for each step in a job. For example, `/home/runner/work/_temp/_runner_file_commands/set_env_87406d6e-4979-4d42-98e1-3dab1f48b13a`. For more information, see "[Workflow commands for {% data variables.product.prodname_actions %}](/actions/using-workflows/workflow-commands-for-github-actions#setting-an-environment-variable)." |
|
||||
| `GITHUB_EVENT_NAME` | The name of the event that triggered the workflow. For example, `workflow_dispatch`. |
|
||||
| `GITHUB_EVENT_PATH` | The path to the file on the runner that contains the full event webhook payload. For example, `/github/workflow/event.json`. |
|
||||
| `GITHUB_GRAPHQL_URL` | Returns the GraphQL API URL. For example: `{% data variables.product.graphql_url_code %}`.
|
||||
| `GITHUB_HEAD_REF` | The head ref or source branch of the pull request in a workflow run. This property is only set when the event that triggers a workflow run is either `pull_request` or `pull_request_target`. For example, `feature-branch-1`. |
|
||||
| `GITHUB_JOB` | The [job_id](/actions/reference/workflow-syntax-for-github-actions#jobsjob_id) of the current job. For example, `greeting_job`. |
|
||||
| `GITHUB_PATH` | The path on the runner to the file that sets system `PATH` variables from workflow commands. This file is unique to the current step and changes for each step in a job. For example, `/home/runner/work/_temp/_runner_file_commands/add_path_899b9445-ad4a-400c-aa89-249f18632cf5`. For more information, see "[Workflow commands for {% data variables.product.prodname_actions %}](/actions/using-workflows/workflow-commands-for-github-actions#adding-a-system-path)." |
|
||||
| `GITHUB_REF` | The branch or tag ref that triggered the workflow run. For branches this is the format `refs/heads/<branch_name>`, and for tags it is `refs/tags/<tag_name>`. This variable is only set if a branch or tag is available for the event type. For example, `refs/heads/feature-branch-1`. |
|
||||
{%- ifversion fpt or ghec or ghes > 3.3 or ghae-issue-5338 %}
|
||||
| `GITHUB_REF_NAME` | {% data reusables.actions.ref_name-description %} |
|
||||
| `GITHUB_REF_NAME` | {% data reusables.actions.ref_name-description %} For example, `feature-branch-1`.|
|
||||
| `GITHUB_REF_PROTECTED` | {% data reusables.actions.ref_protected-description %} |
|
||||
| `GITHUB_REF_TYPE` | {% data reusables.actions.ref_type-description %} |
|
||||
{%- endif %}
|
||||
| `GITHUB_HEAD_REF` | Only set for pull request events. The name of the head branch.
|
||||
| `GITHUB_BASE_REF` | Only set for pull request events. The name of the base branch.
|
||||
| `GITHUB_SERVER_URL`| Returns the URL of the {% data variables.product.product_name %} server. For example: `https://{% data variables.product.product_url %}`.
|
||||
| `GITHUB_API_URL` | Returns the API URL. For example: `{% data variables.product.api_url_code %}`.
|
||||
| `GITHUB_GRAPHQL_URL` | Returns the GraphQL API URL. For example: `{% data variables.product.graphql_url_code %}`.
|
||||
| `RUNNER_NAME` | {% data reusables.actions.runner-name-description %}
|
||||
| `RUNNER_OS` | {% data reusables.actions.runner-os-description %}{% if actions-runner-arch-envvars %}
|
||||
| `RUNNER_ARCH` | {% data reusables.actions.runner-arch-description %}{% endif %}
|
||||
| `RUNNER_TEMP` | {% data reusables.actions.runner-temp-directory-description %}
|
||||
{% ifversion not ghae %}| `RUNNER_TOOL_CACHE` | {% data reusables.actions.runner-tool-cache-description %}{% endif %}
|
||||
| `GITHUB_REPOSITORY` | The owner and repository name. For example, `octocat/Hello-World`. |
|
||||
| `GITHUB_REPOSITORY_OWNER` | The repository owner's name. For example, `octocat`. |
|
||||
| `GITHUB_RETENTION_DAYS` | The number of days that workflow run logs and artifacts are kept. For example, `90`. |
|
||||
| `GITHUB_RUN_ATTEMPT` | A unique number for each attempt of a particular workflow run in a repository. This number begins at 1 for the workflow run's first attempt, and increments with each re-run. For example, `3`. |
|
||||
| `GITHUB_RUN_ID` | {% data reusables.github-actions.run_id_description %} For example, `1658821493`. |
|
||||
| `GITHUB_RUN_NUMBER` | {% data reusables.github-actions.run_number_description %} For example, `3`. |
|
||||
| `GITHUB_SERVER_URL`| The URL of the {% data variables.product.product_name %} server. For example: `https://{% data variables.product.product_url %}`.
|
||||
| `GITHUB_SHA` | The commit SHA that triggered the workflow. For example, `ffac537e6cbbf934b08745a378932722df287a53`. |
|
||||
| `GITHUB_WORKFLOW` | The name of the workflow. For example, `My test workflow`. If the workflow file doesn't specify a `name`, the value of this variable is the full path of the workflow file in the repository. |
|
||||
| `GITHUB_WORKSPACE` | The default working directory on the runner for steps, and the default location of your repository when using the [`checkout`](https://github.com/actions/checkout) action. For example, `/home/runner/work/my-repo-name/my-repo-name`. |
|
||||
{%- if actions-runner-arch-envvars %}
|
||||
| `RUNNER_ARCH` | {% data reusables.actions.runner-arch-description %}
|
||||
{%- endif %} |
|
||||
| `RUNNER_NAME` | {% data reusables.actions.runner-name-description %} For example, `Hosted Agent` |
|
||||
| `RUNNER_OS` | {% data reusables.actions.runner-os-description %} For example, `Windows` |
|
||||
| `RUNNER_TEMP` | {% data reusables.actions.runner-temp-directory-description %} For example, `D:\a\_temp` |
|
||||
{% ifversion not ghae %}| `RUNNER_TOOL_CACHE` | {% data reusables.actions.runner-tool-cache-description %} For example, `C:\hostedtoolcache\windows` |{% endif %}
|
||||
|
||||
{% tip %}
|
||||
{% note %}
|
||||
|
||||
**Note:** If you need to use a workflow run's URL from within a job, you can combine these environment variables: `$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID`
|
||||
**Note:**
|
||||
|
||||
{% endtip %}
|
||||
* If you need to use a workflow run's URL from within a job, you can combine these environment variables: `$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID`
|
||||
* Most of the default environment variables have a corresponding, and similarly named, context property. For example, the value of the `GITHUB_REF` environment variable can be read during workflow processing using the {% raw %}`${{ github.ref }}`{% endraw %} context property.
|
||||
|
||||
### Determining when to use default environment variables or contexts
|
||||
{% endnote %}
|
||||
|
||||
{% data reusables.github-actions.using-context-or-environment-variables %}
|
||||
## Detecting the operating system
|
||||
|
||||
## Naming conventions for environment variables
|
||||
You can write a single workflow file that can be used for different operating systems by using the `RUNNER_OS` default environment variable and the corresponding context property <span style="white-space: nowrap;">{% raw %}`${{ runner.os }}`{% endraw %}</span>. For example, the following workflow could be run successfully if you changed the operating system from `macos-latest` to `windows-latest` without having to alter the syntax of the environment variables, which differs depending on the shell being used by the runner.
|
||||
|
||||
When you set a custom environment variable, you cannot use any of the default environment variable names listed above with the prefix `GITHUB_`. If you attempt to override the value of one of these default environment variables, the assignment is ignored.
|
||||
{% raw %}
|
||||
```yaml
|
||||
jobs:
|
||||
if-Windows-else:
|
||||
runs-on: macos-latest
|
||||
steps:
|
||||
- name: condition 1
|
||||
if: runner.os == 'Windows'
|
||||
run: echo "The operating system on the runner is $env:RUNNER_OS."
|
||||
- name: condition 2
|
||||
if: runner.os != 'Windows'
|
||||
run: echo "The operating system on the runner is not Windows, it's $RUNNER_OS."
|
||||
```
|
||||
{% endraw %}
|
||||
|
||||
Any new environment variables you set that point to a location on the filesystem should have a `_PATH` suffix. The `HOME` and `GITHUB_WORKSPACE` default variables are exceptions to this convention because the words "home" and "workspace" already imply a location.
|
||||
In this example, the two `if` statements check the `os` property of the `runner` context to determine the operating system of the runner. `if` conditionals are processed by {% data variables.product.prodname_actions %}, and only steps where the check resolves as `true` are sent to the runner. Here one of the checks will always be `true` and the other `false`, so only one of these steps is sent to the runner. Once the job is sent to the runner, the step is executed and the environment variable in the `echo` command is interpolated using the appropriate syntax (`$env:NAME` for PowerShell on Windows, and `$NAME` for bash and sh on Linux and MacOS). In this example, the statement `runs-on: macos-latest` means that the second step will be run.
|
||||
|
||||
## Passing values between steps and jobs in a workflow
|
||||
|
||||
If you generate a value in one step of a job, you can use the value in subsequent steps of the same job by assigning the value to an existing or new environment variable and then writing this to the `GITHUB_ENV` environment file. The environment file can be used directly by an action, or from a shell command in the workflow file by using the `run` keyword. For more information, see "[Workflow commands for {% data variables.product.prodname_actions %}](/actions/reference/workflow-commands-for-github-actions/#setting-an-environment-variable)."
|
||||
|
||||
If you want to pass a value from a step in one job in a workflow to a step in another job in the workflow, you can define the value as a job output. You can then reference this job output from a step in another job. For more information, see "[Workflow syntax for {% data variables.product.prodname_actions %}](/actions/learn-github-actions/workflow-syntax-for-github-actions#jobsjob_idoutputs)."
|
||||
|
||||
@@ -15,7 +15,7 @@ miniTocMaxHeadingLevel: 3
|
||||
|
||||
## About expressions
|
||||
|
||||
You can use expressions to programmatically set variables in workflow files and access contexts. An expression can be any combination of literal values, references to a context, or functions. You can combine literals, context references, and functions using operators. For more information about contexts, see "[Contexts](/actions/learn-github-actions/contexts)."
|
||||
You can use expressions to programmatically set environment variables in workflow files and access contexts. An expression can be any combination of literal values, references to a context, or functions. You can combine literals, context references, and functions using operators. For more information about contexts, see "[Contexts](/actions/learn-github-actions/contexts)."
|
||||
|
||||
Expressions are commonly used with the conditional `if` keyword in a workflow file to determine whether a step should run. When an `if` conditional is `true`, the step will run.
|
||||
|
||||
@@ -55,11 +55,12 @@ As part of an expression, you can use `boolean`, `null`, `number`, or `string` d
|
||||
| `boolean` | `true` or `false` |
|
||||
| `null` | `null` |
|
||||
| `number` | Any number format supported by JSON. |
|
||||
| `string` | You must use single quotes. Escape literal single-quotes with a single quote. |
|
||||
| `string` | You don't need to enclose strings in {% raw %}${{{% endraw %} and {% raw %}}}{% endraw %}. However, if you do, you must use single quotes around the string and escape literal single quotes with an additional single quote. |
|
||||
|
||||
#### Example
|
||||
|
||||
{% raw %}
|
||||
|
||||
```yaml
|
||||
env:
|
||||
myNull: ${{ null }}
|
||||
@@ -68,9 +69,10 @@ env:
|
||||
myFloatNumber: ${{ -9.2 }}
|
||||
myHexNumber: ${{ 0xff }}
|
||||
myExponentialNumber: ${{ -2.99-e2 }}
|
||||
myString: ${{ 'Mona the Octocat' }}
|
||||
myEscapedString: ${{ 'It''s open source!' }}
|
||||
myString: Mona the Octocat
|
||||
myStringInBraces: ${{ 'It''s open source!' }}
|
||||
```
|
||||
|
||||
{% endraw %}
|
||||
|
||||
## Operators
|
||||
@@ -79,7 +81,7 @@ env:
|
||||
| --- | --- |
|
||||
| `( )` | Logical grouping |
|
||||
| `[ ]` | Index
|
||||
| `.` | Property dereference |
|
||||
| `.` | Property de-reference |
|
||||
| `!` | Not |
|
||||
| `<` | Less than |
|
||||
| `<=` | Less than or equal |
|
||||
@@ -252,7 +254,7 @@ jobs:
|
||||
|
||||
Returns a single hash for the set of files that matches the `path` pattern. You can provide a single `path` pattern or multiple `path` patterns separated by commas. The `path` is relative to the `GITHUB_WORKSPACE` directory and can only include files inside of the `GITHUB_WORKSPACE`. This function calculates an individual SHA-256 hash for each matched file, and then uses those hashes to calculate a final SHA-256 hash for the set of files. For more information about SHA-256, see "[SHA-2](https://en.wikipedia.org/wiki/SHA-2)."
|
||||
|
||||
You can use pattern matching characters to match file names. Pattern matching is case-insensitive on Windows. For more information about supported pattern matching characters, see "[Workflow syntax for {% data variables.product.prodname_actions %}](/github/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions/#filter-pattern-cheat-sheet)."
|
||||
You can use pattern matching characters to match file names. Pattern matching is case-insensitive on Windows. For more information about supported pattern matching characters, see "[Workflow syntax for {% data variables.product.prodname_actions %}](/actions/using-workflows/workflow-syntax-for-github-actions/#filter-pattern-cheat-sheet)."
|
||||
|
||||
#### Example with a single pattern
|
||||
|
||||
|
||||
@@ -24,8 +24,9 @@ topics:
|
||||
|
||||
The actions you use in your workflow can be defined in:
|
||||
|
||||
- A public repository
|
||||
- The same repository where your workflow file references the action
|
||||
- The same repository as your workflow file{% if internal-actions %}
|
||||
- An internal repository within the same enterprise account that is configured to allow access to workflows{% endif %}
|
||||
- Any public repository
|
||||
- A published Docker container image on Docker Hub
|
||||
|
||||
{% data variables.product.prodname_marketplace %} is a central location for you to find actions created by the {% data variables.product.prodname_dotcom %} community.{% ifversion fpt or ghec %} [{% data variables.product.prodname_marketplace %} page](https://github.com/marketplace/actions/) enables you to filter for actions by category. {% endif %}
|
||||
@@ -46,6 +47,10 @@ You can search and browse actions directly in your repository's workflow editor.
|
||||
|
||||
## Adding an action to your workflow
|
||||
|
||||
You can add an action to your workflow by referencing the action in your workflow file.
|
||||
|
||||
### Adding an action from {% data variables.product.prodname_marketplace %}
|
||||
|
||||
An action's listing page includes the action's version and the workflow syntax required to use the action. To keep your workflow stable even when updates are made to an action, you can reference the version of the action to use by specifying the Git or Docker tag number in your workflow file.
|
||||
|
||||
1. Navigate to the action you want to use in your workflow.
|
||||
@@ -58,6 +63,66 @@ An action's listing page includes the action's version and the workflow syntax r
|
||||
|
||||
{% endif %}
|
||||
|
||||
### Adding an action from the same repository
|
||||
|
||||
If an action is defined in the same repository where your workflow file uses the action, you can reference the action with either the `{owner}/{repo}@{ref}` or `./path/to/dir` syntax in your workflow file.
|
||||
|
||||
Example repository file structure:
|
||||
|
||||
```
|
||||
|-- hello-world (repository)
|
||||
| |__ .github
|
||||
| └── workflows
|
||||
| └── my-first-workflow.yml
|
||||
| └── actions
|
||||
| |__ hello-world-action
|
||||
| └── action.yml
|
||||
```
|
||||
|
||||
Example workflow file:
|
||||
|
||||
```yaml
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
# This step checks out a copy of your repository.
|
||||
- uses: actions/checkout@v2
|
||||
# This step references the directory that contains the action.
|
||||
- uses: ./.github/actions/hello-world-action
|
||||
```
|
||||
|
||||
The `action.yml` file is used to provide metadata for the action. Learn about the content of this file in "[Metadata syntax for GitHub Actions](/actions/creating-actions/metadata-syntax-for-github-actions)."
|
||||
|
||||
### Adding an action from a different repository
|
||||
|
||||
If an action is defined in a different repository than your workflow file, you can reference the action with the `{owner}/{repo}@{ref}` syntax in your workflow file.
|
||||
|
||||
The action must be stored in a public repository{% if internal-actions %} or an internal repository that is configured to allow access to workflows. For more information, see "[Sharing actions and workflows with your enterprise](/actions/creating-actions/sharing-actions-and-workflows-with-your-enterprise)."{% else %}.{% endif %}
|
||||
|
||||
```yaml
|
||||
jobs:
|
||||
my_first_job:
|
||||
steps:
|
||||
- name: My first step
|
||||
uses: actions/setup-node@v1.1.0
|
||||
```
|
||||
|
||||
### Referencing a container on Docker Hub
|
||||
|
||||
If an action is defined in a published Docker container image on Docker Hub, you must reference the action with the `docker://{image}:{tag}` syntax in your workflow file. To protect your code and data, we strongly recommend you verify the integrity of the Docker container image from Docker Hub before using it in your workflow.
|
||||
|
||||
```yaml
|
||||
jobs:
|
||||
my_first_job:
|
||||
steps:
|
||||
- name: My first step
|
||||
uses: docker://alpine:3.8
|
||||
```
|
||||
|
||||
For some examples of Docker actions, see the [Docker-image.yml workflow](https://github.com/actions/starter-workflows/blob/main/ci/docker-image.yml) and "[Creating a Docker container action](/articles/creating-a-docker-container-action)."
|
||||
|
||||
|
||||
## Using release management for your custom actions
|
||||
|
||||
The creators of a community action have the option to use tags, branches, or SHA values to manage releases of the action. Similar to any dependency, you should indicate the version of the action you'd like to use based on your comfort with automatically accepting updates to the action.
|
||||
@@ -127,51 +192,6 @@ outputs:
|
||||
By default, you can use most of the official {% data variables.product.prodname_dotcom %}-authored actions in {% data variables.product.prodname_ghe_managed %}. For more information, see "[Using actions in {% data variables.product.prodname_ghe_managed %}](/admin/github-actions/using-actions-in-github-ae)."
|
||||
{% endif %}
|
||||
|
||||
## Referencing an action in the same repository where a workflow file uses the action
|
||||
|
||||
If an action is defined in the same repository where your workflow file uses the action, you can reference the action with either the `{owner}/{repo}@{ref}` or `./path/to/dir` syntax in your workflow file.
|
||||
|
||||
Example repository file structure:
|
||||
|
||||
```
|
||||
|-- hello-world (repository)
|
||||
| |__ .github
|
||||
| └── workflows
|
||||
| └── my-first-workflow.yml
|
||||
| └── actions
|
||||
| |__ hello-world-action
|
||||
| └── action.yml
|
||||
```
|
||||
|
||||
Example workflow file:
|
||||
|
||||
```yaml
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
# This step checks out a copy of your repository.
|
||||
- uses: actions/checkout@v2
|
||||
# This step references the directory that contains the action.
|
||||
- uses: ./.github/actions/hello-world-action
|
||||
```
|
||||
|
||||
The `action.yml` file is used to provide metadata for the action. Learn about the content of this file in "[Metadata syntax for GitHub Actions](/actions/creating-actions/metadata-syntax-for-github-actions)"
|
||||
|
||||
## Referencing a container on Docker Hub
|
||||
|
||||
If an action is defined in a published Docker container image on Docker Hub, you must reference the action with the `docker://{image}:{tag}` syntax in your workflow file. To protect your code and data, we strongly recommend you verify the integrity of the Docker container image from Docker Hub before using it in your workflow.
|
||||
|
||||
```yaml
|
||||
jobs:
|
||||
my_first_job:
|
||||
steps:
|
||||
- name: My first step
|
||||
uses: docker://alpine:3.8
|
||||
```
|
||||
|
||||
For some examples of Docker actions, see the [Docker-image.yml workflow](https://github.com/actions/starter-workflows/blob/main/ci/docker-image.yml) and "[Creating a Docker container action](/articles/creating-a-docker-container-action)."
|
||||
|
||||
## Next steps
|
||||
|
||||
To continue learning about {% data variables.product.prodname_actions %}, see "[Essential features of {% data variables.product.prodname_actions %}](/actions/learn-github-actions/essential-features-of-github-actions)."
|
||||
|
||||
@@ -64,6 +64,8 @@ An _action_ is a custom application for the {% data variables.product.prodname_a
|
||||
|
||||
You can write your own actions, or you can find actions to use in your workflows in the {% data variables.product.prodname_marketplace %}.
|
||||
|
||||
{% data reusables.actions.internal-actions-summary %}
|
||||
|
||||
For more information, see "[Creating actions](/actions/creating-actions)."
|
||||
|
||||
### Runners
|
||||
|
||||
@@ -196,6 +196,12 @@ You can help mitigate this risk by following these good practices:
|
||||
The same principles described above for using third-party actions also apply to using third-party workflows. You can help mitigate the risks associated with reusing workflows by following the same good practices outlined above. For more information, see "[Reusing workflows](/actions/learn-github-actions/reusing-workflows)."
|
||||
{% endif %}
|
||||
|
||||
{% if internal-actions %}
|
||||
## Allowing workflows to access internal repositories
|
||||
|
||||
{% data reusables.actions.outside-collaborators-internal-actions %} For more information, see "[Sharing actions and workflows with your enterprise](/actions/creating-actions/sharing-actions-and-workflows-with-your-enterprise)."
|
||||
{% endif %}
|
||||
|
||||
## Potential impact of a compromised runner
|
||||
|
||||
These sections consider some of the steps an attacker can take if they're able to run malicious commands on a {% data variables.product.prodname_actions %} runner.
|
||||
|
||||
@@ -5,7 +5,7 @@ intro: Modify the default permissions granted to `GITHUB_TOKEN`.
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghes: '> 3.1'
|
||||
ghae: 'ghae-next'
|
||||
ghae: '*'
|
||||
ghec: '*'
|
||||
miniTocMaxHeadingLevel: 4
|
||||
---
|
||||
|
||||
@@ -5,7 +5,7 @@ intro: Run a single job at a time.
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghes: '> 3.1'
|
||||
ghae: 'ghae-next'
|
||||
ghae: '*'
|
||||
ghec: '*'
|
||||
miniTocMaxHeadingLevel: 4
|
||||
---
|
||||
|
||||
@@ -164,7 +164,10 @@ To learn more about self-hosted runner labels, see ["Using labels with self-host
|
||||
To learn more about {% data variables.product.prodname_dotcom %}-hosted runner labels, see ["Supported runners and hardware resources"](/actions/using-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources).
|
||||
{% endif %}
|
||||
|
||||
{% ifversion fpt or ghes > 3.3 or ghae-issue-4757 or ghec %}
|
||||
## Reusing workflows
|
||||
{% data reusables.actions.reusable-workflows %}
|
||||
{% endif %}
|
||||
|
||||
{% ifversion fpt or ghes > 3.0 or ghae or ghec %}
|
||||
|
||||
|
||||
@@ -1397,6 +1397,61 @@ on: workflow_dispatch
|
||||
|
||||
You can configure custom-defined input properties, default input values, and required inputs for the event directly in your workflow. When you trigger the event, you can provide the `ref` and any `inputs`. When the workflow runs, you can access the input values in the `github.event.inputs` context. For more information, see "[Contexts](/actions/learn-github-actions/contexts)."
|
||||
|
||||
{% ifversion fpt or ghec or ghes > 3.3 or ghae-issue-5511 %}
|
||||
This example defines inputs called `logLevel`, `tags`, and `environment`. You pass values for these inputs to the workflow when you run it. This workflow then prints the values to the log, using the `github.event.inputs.logLevel`, `github.event.inputs.tags`, and `github.event.inputs.environment` context properties.
|
||||
|
||||
{% raw %}
|
||||
```yaml
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
logLevel:
|
||||
description: 'Log level'
|
||||
required: true
|
||||
default: 'warning'
|
||||
type: choice
|
||||
options:
|
||||
- info
|
||||
- warning
|
||||
- debug
|
||||
tags:
|
||||
description: 'Test scenario tags'
|
||||
required: false
|
||||
type: boolean
|
||||
environment:
|
||||
description: 'Environment to run tests against'
|
||||
type: environment
|
||||
required: true
|
||||
|
||||
jobs:
|
||||
log-the-inputs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- run: |
|
||||
echo "Log level: $LEVEL"
|
||||
echo "Tags: $TAGS"
|
||||
echo "Environment: $ENVIRONMENT"
|
||||
env:
|
||||
LEVEL: ${{ github.event.inputs.logLevel }}
|
||||
TAGS: ${{ github.event.inputs.tags }}
|
||||
ENVIRONMENT: ${{ github.event.inputs.environment }}
|
||||
```
|
||||
{% endraw %}
|
||||
|
||||
If you run this workflow from a browser you must enter values for the required inputs manually before the workflow will run.
|
||||
|
||||

|
||||
|
||||
You can also pass inputs when you run a workflow from a script, or by using {% data variables.product.prodname_cli %}. For example:
|
||||
|
||||
```
|
||||
gh workflow run run-tests.yml -f logLevel=warning -f tags=false -f environment=staging
|
||||
```
|
||||
|
||||
For more information, see the {% data variables.product.prodname_cli %} information in "[Manually running a workflow](/actions/managing-workflow-runs/manually-running-a-workflow)."
|
||||
|
||||
|
||||
{% else %}
|
||||
This example defines the `name` and `home` inputs and prints them using the `github.event.inputs.name` and `github.event.inputs.home` contexts. If a `home` isn't provided, the default value 'The Octoverse' is printed.
|
||||
|
||||
```yaml
|
||||
@@ -1424,6 +1479,7 @@ jobs:
|
||||
NAME: {% raw %}${{ github.event.inputs.name }}{% endraw %}
|
||||
HOME: {% raw %}${{ github.event.inputs.home }}{% endraw %}
|
||||
```
|
||||
{% endif %}
|
||||
|
||||
### `workflow_run`
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ A reusable workflow can be used by another workflow if {% ifversion ghes or ghec
|
||||
|
||||
* Both workflows are in the same repository.
|
||||
* The called workflow is stored in a public repository.{% ifversion ghes or ghec or ghae %}
|
||||
* The called workflow is stored in an internal repository and the settings for that repository allow it to be accessed. For more information, see "[Managing {% data variables.product.prodname_actions %} settings for a repository](/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#allowing-access-to-components-in-an-internal-repository)."{% endif %}
|
||||
* The called workflow is stored in an internal repository and the settings for that repository allow it to be accessed. For more information, see {% if internal-actions %}"[Sharing actions and workflows with your enterprise](/actions/creating-actions/sharing-actions-and-workflows-with-your-enterprise){% else %}"[Managing {% data variables.product.prodname_actions %} settings for a repository](/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#allowing-access-to-components-in-an-internal-repository){% endif %}."{% endif %}
|
||||
|
||||
## Using runners
|
||||
|
||||
@@ -164,9 +164,9 @@ You call a reusable workflow by using the `uses` keyword. Unlike when you are us
|
||||
|
||||
[`jobs.<job_id>.uses`](/actions/reference/workflow-syntax-for-github-actions#jobsjob_iduses)
|
||||
|
||||
You reference reusable workflow files using the syntax:
|
||||
You reference reusable workflow files using {% ifversion fpt or ghec or ghes > 3.4 or ghae-issue-6000 %}one of the following syntaxes:{% else %}the syntax:{% endif %}
|
||||
|
||||
`{owner}/{repo}/{path}/{filename}@{ref}`
|
||||
{% data reusables.actions.reusable-workflow-calling-syntax %}
|
||||
|
||||
You can call multiple workflows, referencing each in a separate job.
|
||||
|
||||
|
||||
@@ -20,11 +20,29 @@ type: how_to
|
||||
|
||||
If you need to share workflows and other {% data variables.product.prodname_actions %} features with your team, then consider collaborating within a {% data variables.product.prodname_dotcom %} organization. An organization allows you to centrally store and manage secrets, artifacts, and self-hosted runners. You can also create starter workflows in the `.github` repository and share them with other users in your organization.
|
||||
|
||||
## Using starter workflows
|
||||
## Sharing {% if internal-actions %}actions and {% endif %}workflows
|
||||
|
||||
{% data reusables.actions.workflow-organization-templates %} For more information, see "[Creating starter workflows for your organization](/actions/using-workflows/creating-starter-workflows-for-your-organization)."
|
||||
{% if internal-actions %}
|
||||
You can share both individual actions and entire workflows with your organization, with or without publishing the actions or workflows publicly. You can reuse actions and workflows exactly by referencing them in your workflow file, and you can create starter workflows that provide templates for new workflows.
|
||||
{% else %}
|
||||
Your organization can share workflows by reusing the workflows exactly or by creating starter workflows that provide templates for new workflows.
|
||||
{% endif %}
|
||||
|
||||
{% if internal-actions %}
|
||||
### Sharing actions with your enterprise
|
||||
|
||||
{% data reusables.actions.internal-actions-summary %}
|
||||
{% endif %}
|
||||
|
||||
{% ifversion fpt or ghes > 3.3 or ghae-issue-4757 or ghec %}
|
||||
### Reusing workflows
|
||||
|
||||
{% data reusables.actions.reusable-workflows %}
|
||||
{% endif %}
|
||||
|
||||
### Using starter workflows
|
||||
|
||||
{% data reusables.actions.workflow-organization-templates %} For more information, see "[Creating starter workflows for your organization](/actions/using-workflows/creating-starter-workflows-for-your-organization)."
|
||||
|
||||
## Sharing secrets within an organization
|
||||
|
||||
|
||||
@@ -307,7 +307,7 @@ The `STATE_processID` variable is then exclusively available to the cleanup scri
|
||||
console.log("The running PID from the main action is: " + process.env.STATE_processID);
|
||||
```
|
||||
|
||||
## Environment Files
|
||||
## Environment files
|
||||
|
||||
During the execution of a workflow, the runner generates temporary files that can be used to perform certain actions. The path to these files are exposed via environment variables. You will need to use UTF-8 encoding when writing to these files to ensure proper processing of the commands. Multiple commands can be written to the same file, separated by newlines.
|
||||
|
||||
@@ -345,16 +345,10 @@ More detail about UTF-8 and PowerShell Core found on this great [Stack Overflow
|
||||
## Setting an environment variable
|
||||
|
||||
``` bash
|
||||
echo "{name}={value}" >> $GITHUB_ENV
|
||||
echo "{environment_variable_name}={value}" >> $GITHUB_ENV
|
||||
```
|
||||
|
||||
Creates or updates an environment variable for any steps running next in a job. The step that creates or updates the environment variable does not have access to the new value, but all subsequent steps in a job will have access. Environment variables are case-sensitive and you can include punctuation.
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note:** Environment variables must be explicitly referenced using the [`env` context](/actions/reference/context-and-expression-syntax-for-github-actions#env-context) in expression syntax or through use of the `$GITHUB_ENV` file directly; environment variables are not implicitly available in shell commands.
|
||||
|
||||
{% endnote %}
|
||||
You can make an environment variable available to any subsequent steps in a workflow job by defining or updating the environment variable and writing this to the `GITHUB_ENV` environment file. The step that creates or updates the environment variable does not have access to the new value, but all subsequent steps in a job will have access. The names of environment variables are case-sensitive, and you can include punctuation. For more information, see "[Environment variables](/actions/learn-github-actions/environment-variables)."
|
||||
|
||||
### Example
|
||||
|
||||
|
||||
@@ -183,7 +183,7 @@ on:
|
||||
logLevel:
|
||||
description: 'Log level'
|
||||
required: true
|
||||
default: 'warning' {% ifversion ghec or ghes > 3.3 or ghae-issue-5511 %}
|
||||
default: 'warning' {% ifversion fpt or ghec or ghes > 3.3 or ghae-issue-5511 %}
|
||||
type: choice
|
||||
options:
|
||||
- info
|
||||
@@ -191,7 +191,7 @@ on:
|
||||
- debug {% endif %}
|
||||
tags:
|
||||
description: 'Test scenario tags'
|
||||
required: false {% ifversion ghec or ghes > 3.3 or ghae-issue-5511 %}
|
||||
required: false {% ifversion fpt or ghec or ghes > 3.3 or ghae-issue-5511 %}
|
||||
type: boolean
|
||||
environment:
|
||||
description: 'Environment to run tests against'
|
||||
@@ -914,11 +914,9 @@ Additional Docker container resource options. For a list of options, see "[`dock
|
||||
{% ifversion fpt or ghes > 3.3 or ghae-issue-4757 or ghec %}
|
||||
## `jobs.<job_id>.uses`
|
||||
|
||||
The location and version of a reusable workflow file to run as a job.
|
||||
The location and version of a reusable workflow file to run as a job. {% ifversion fpt or ghec or ghes > 3.4 or ghae-issue-6000 %}Use one of the following syntaxes:{% endif %}
|
||||
|
||||
`{owner}/{repo}/{path}/{filename}@{ref}`
|
||||
|
||||
`{ref}` can be a SHA, a release tag, or a branch name. Using the commit SHA is the safest for stability and security. For more information, see "[Security hardening for GitHub Actions](/actions/learn-github-actions/security-hardening-for-github-actions#reusing-third-party-workflows)."
|
||||
{% data reusables.actions.reusable-workflow-calling-syntax %}
|
||||
|
||||
### Example
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ For guidance on a phased deployment of GitHub Advanced Security, see "[Deploying
|
||||
|
||||
- {% data variables.product.prodname_code_scanning_capc %}, see "[Configuring {% data variables.product.prodname_code_scanning %} for your appliance](/admin/advanced-security/configuring-code-scanning-for-your-appliance#prerequisites-for-code-scanning)."
|
||||
- {% data variables.product.prodname_secret_scanning_caps %}, see "[Configuring {% data variables.product.prodname_secret_scanning %} for your appliance](/admin/advanced-security/configuring-secret-scanning-for-your-appliance#prerequisites-for-secret-scanning)."{% endif %}
|
||||
- {% data variables.product.prodname_dependabot %}, see "[Enabling the dependency graph and {% data variables.product.prodname_dependabot_alerts %} on your enterprise account](/admin/configuration/managing-connections-between-your-enterprise-accounts/enabling-the-dependency-graph-and-dependabot-alerts-on-your-enterprise-account)."
|
||||
- {% data variables.product.prodname_dependabot %}, see "[Enabling the dependency graph and {% data variables.product.prodname_dependabot_alerts %} for your enterprise](/admin/configuration/configuring-github-connect/enabling-the-dependency-graph-and-dependabot-alerts-for-your-enterprise)."
|
||||
|
||||
## Enabling and disabling {% data variables.product.prodname_GH_advanced_security %} features
|
||||
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
---
|
||||
title: About GitHub Connect
|
||||
intro: "{% data variables.product.prodname_github_connect %} enhances {% data variables.product.product_name %} by giving you access to additional features and workflows that rely on the power of {% data variables.product.prodname_dotcom_the_website %}."
|
||||
versions:
|
||||
ghes: '*'
|
||||
ghae: '*'
|
||||
type: overview
|
||||
topics:
|
||||
- Enterprise
|
||||
- GitHub Connect
|
||||
---
|
||||
|
||||
## About {% data variables.product.prodname_github_connect %}
|
||||
|
||||
{% data variables.product.prodname_github_connect %} enhances {% data variables.product.product_name %} by allowing {% data variables.product.product_location %} to benefit from the power of {% data variables.product.prodname_dotcom_the_website %} in limited ways. After you enable {% data variables.product.prodname_github_connect %}, you can enable additional features and workflows that rely on {% data variables.product.prodname_dotcom_the_website %}, such as {% ifversion ghes or ghae-issue-4864 %}{% data variables.product.prodname_dependabot_alerts %} for security vulnerabilities that are tracked in the {% data variables.product.prodname_advisory_database %}{% else %}allowing users to use community-powered actions from {% data variables.product.prodname_dotcom_the_website %} in their workflow files{% endif %}.
|
||||
|
||||
{% data variables.product.prodname_github_connect %} does not open {% data variables.product.product_location %} to the public internet. None of your enterprise's private data is exposed to {% data variables.product.prodname_dotcom_the_website %} users. Instead, {% data variables.product.prodname_github_connect %} transmits only the limited data needed for the individual features you choose to enable. Unless you enable license sync, no personal data is transmitted by {% data variables.product.prodname_github_connect %}. For more information about what data is transmitted by {% data variables.product.prodname_github_connect %}, see "[Data transmission for {% data variables.product.prodname_github_connect %}](#data-transmission-for-github-connect)."
|
||||
|
||||
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.product_name %}.
|
||||
|
||||
To enable {% data variables.product.prodname_github_connect %}, you configure a connection between {% data variables.product.product_location %} and an organization or enterprise account on {% data variables.product.prodname_dotcom_the_website %} that uses {% data variables.product.prodname_ghe_cloud %}. For more information, see "[Managing {% data variables.product.prodname_github_connect %}](/admin/configuration/configuring-github-connect/managing-github-connect)."
|
||||
|
||||
After enabling {% data variables.product.prodname_github_connect %}, you will be able to enable features such as {% ifversion ghes %}automatic user license sync and {% endif %}{% data variables.product.prodname_dependabot_alerts %}. For more information about all of the features available, see "[{% data variables.product.prodname_github_connect %} features](#github-connect-features)."
|
||||
|
||||
## {% data variables.product.prodname_github_connect %} features
|
||||
|
||||
After you configure the connection between {% data variables.product.product_location %} and {% data variables.product.prodname_ghe_cloud %}, you can enable individual features of {% data variables.product.prodname_github_connect %} for your enterprise.
|
||||
|
||||
Feature | Description | More information |
|
||||
------- | ----------- | ---------------- |{% ifversion ghes %}
|
||||
Automatic user license sync | Manage license usage across your {% data variables.product.prodname_enterprise %} deployments by automatically syncing user licenses from {% data variables.product.product_location %} to {% data variables.product.prodname_ghe_cloud %}. | "[Enabling automatic user license sync for your enterprise](/admin/configuration/configuring-github-connect/enabling-automatic-user-license-sync-for-your-enterprise)"{% endif %}{% ifversion ghes or ghae-issue-4864 %}
|
||||
{% data variables.product.prodname_dependabot_alerts %} | Allow users to find and fix vulnerabilities in code dependencies. | "[Enabling the dependency graph and {% data variables.product.prodname_dependabot_alerts %} for your enterprise](/admin/configuration/configuring-github-connect/enabling-the-dependency-graph-and-dependabot-alerts-for-your-enterprise)"{% endif %}
|
||||
{% data variables.product.prodname_dotcom_the_website %} actions | Allow users to use actions from {% data variables.product.prodname_dotcom_the_website %} in workflow files. | "[Enabling automatic access to {% data variables.product.prodname_dotcom_the_website %} actions using {% data variables.product.prodname_github_connect %}](/admin/github-actions/managing-access-to-actions-from-githubcom/enabling-automatic-access-to-githubcom-actions-using-github-connect)"
|
||||
Unified search | Allow users to include repositories on {% data variables.product.prodname_dotcom_the_website %} in their search results when searching from {% data variables.product.product_location %}. | "[Enabling {% data variables.product.prodname_unified_search %} for your enterprise](/admin/configuration/configuring-github-connect/enabling-unified-search-for-your-enterprise)"
|
||||
Unified contributions | Allow users to include anonymized contribution counts for their work on {% data variables.product.product_location %} in their contribution graphs on {% data variables.product.prodname_dotcom_the_website %}. | "[Enabling {% data variables.product.prodname_unified_contributions %} for your enterprise](/admin/configuration/configuring-github-connect/enabling-unified-contributions-for-your-enterprise)"
|
||||
|
||||
## Data transmission for {% data variables.product.prodname_github_connect %}
|
||||
|
||||
When you enable {% data variables.product.prodname_github_connect %} or specific {% data variables.product.prodname_github_connect %} features, a record on {% data variables.product.prodname_ghe_cloud %} stores the following information about the connection.
|
||||
{% ifversion ghes %}
|
||||
- The public key portion of your {% data variables.product.prodname_ghe_server %} license
|
||||
- A hash of your {% data variables.product.prodname_ghe_server %} license
|
||||
- The customer name on your {% data variables.product.prodname_ghe_server %} license
|
||||
- The version of {% data variables.product.product_location_enterprise %}{% endif %}
|
||||
- The hostname of {% data variables.product.product_location %}
|
||||
- The organization or enterprise account on {% data variables.product.prodname_ghe_cloud %} that's connected to {% data variables.product.product_location %}
|
||||
- The authentication token that's used by {% data variables.product.product_location %} to make requests to {% data variables.product.prodname_ghe_cloud %}
|
||||
- If Transport Layer Security (TLS) is enabled and configured on {% data variables.product.product_location %}{% ifversion ghes %}
|
||||
- The {% data variables.product.prodname_github_connect %} features that are enabled on {% data variables.product.product_location %}, and the date and time of enablement{% endif %}
|
||||
|
||||
{% data variables.product.prodname_github_connect %} syncs the above connection data between {% data variables.product.product_location %} and {% data variables.product.prodname_ghe_cloud %} weekly, from the day and approximate time that {% data variables.product.prodname_github_connect %} was enabled.
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note:** No repositories, issues, or pull requests are ever transmitted by {% data variables.product.prodname_github_connect %}.
|
||||
|
||||
{% endnote %}
|
||||
|
||||
Additional data is transmitted if you enable individual features of {% data variables.product.prodname_github_connect %}.
|
||||
|
||||
Feature | Data | Which way does the data flow? | Where is the data used? |
|
||||
------- | ---- | --------- | ------ |{% ifversion ghes %}
|
||||
Automatic user license sync | Each {% data variables.product.product_name %} user's user ID and email addresses | From {% data variables.product.product_name %} to {% data variables.product.prodname_ghe_cloud %} | {% data variables.product.prodname_ghe_cloud %} |{% endif %}{% ifversion ghes or ghae-issue-4864 %}
|
||||
{% data variables.product.prodname_dependabot_alerts %} | Vulnerability alerts | From {% data variables.product.prodname_dotcom_the_website %} to {% data variables.product.product_name %} | {% data variables.product.product_name%} |{% endif %}
|
||||
{% data variables.product.prodname_dotcom_the_website %} actions | Name of action, action (YAML file from {% data variables.product.prodname_marketplace %}) | From {% data variables.product.prodname_dotcom_the_website %} to {% data variables.product.product_name %}<br><br>From {% data variables.product.product_name %} to {% data variables.product.prodname_dotcom_the_website %} | {% data variables.product.product_name %}
|
||||
Unified search | Search terms, search results | From {% data variables.product.prodname_dotcom_the_website %} to {% data variables.product.product_name %}<br><br>From {% data variables.product.product_name %} to {% data variables.product.prodname_dotcom_the_website %} | {% data variables.product.product_name %} |
|
||||
Unified contributions | Contribution counts | From {% data variables.product.product_name %} to {% data variables.product.prodname_dotcom_the_website %} | {% data variables.product.prodname_dotcom_the_website %} |
|
||||
|
||||
## Further reading
|
||||
|
||||
- "[Enterprise accounts](/graphql/guides/managing-enterprise-accounts)" in the GraphQL API documentation
|
||||
@@ -1,11 +1,12 @@
|
||||
---
|
||||
title: Enabling automatic user license sync between GitHub Enterprise Server and GitHub Enterprise Cloud
|
||||
intro: 'You can connect {% data variables.product.product_location_enterprise %} to {% data variables.product.prodname_ghe_cloud %} and allow {% data variables.product.prodname_ghe_server %} to upload user license information to your enterprise account on {% data variables.product.prodname_dotcom_the_website %}.'
|
||||
title: Enabling automatic user license sync for your enterprise
|
||||
intro: 'You can manage license usage across your {% data variables.product.prodname_enterprise %} deployments by automatically syncing user licenses from {% data variables.product.product_location %} to {% data variables.product.prodname_ghe_cloud %}.'
|
||||
redirect_from:
|
||||
- /enterprise/admin/installation/enabling-automatic-user-license-sync-between-github-enterprise-server-and-github-enterprise-cloud
|
||||
- /enterprise/admin/configuration/enabling-automatic-user-license-sync-between-github-enterprise-server-and-github-enterprise-cloud
|
||||
- /admin/configuration/enabling-automatic-user-license-sync-between-github-enterprise-server-and-github-enterprise-cloud
|
||||
- /admin/configuration/managing-connections-between-github-enterprise-server-and-github-enterprise-cloud/enabling-automatic-user-license-sync-between-github-enterprise-server-and-github-enterprise-cloud
|
||||
- /admin/configuration/managing-connections-between-your-enterprise-accounts/enabling-automatic-user-license-sync-between-github-enterprise-server-and-github-enterprise-cloud
|
||||
permissions: 'Site administrators for {% data variables.product.prodname_ghe_server %} who are also owners of the connected {% data variables.product.prodname_ghe_cloud %} organization or enterprise account can enable automatic user license synchronization.'
|
||||
versions:
|
||||
ghes: '*'
|
||||
@@ -14,17 +15,17 @@ topics:
|
||||
- Enterprise
|
||||
- GitHub Connect
|
||||
- Licensing
|
||||
shortTitle: Enable user license sync
|
||||
shortTitle: Automatic user license sync
|
||||
---
|
||||
## About license synchronization
|
||||
|
||||
After you enable license synchronization, you'll be able to view license usage for your entire enterprise account, across {% data variables.product.prodname_ghe_server %} and {% data variables.product.prodname_ghe_cloud %}. {% data variables.product.prodname_github_connect %} syncs license between {% data variables.product.prodname_ghe_server %} and {% data variables.product.prodname_ghe_cloud %} weekly. For more information, see "[Managing your license for {% data variables.product.prodname_enterprise %}](/billing/managing-your-license-for-github-enterprise)."
|
||||
After you enable license synchronization, you'll be able to view license usage for your entire enterprise across {% data variables.product.prodname_ghe_server %} and {% data variables.product.prodname_ghe_cloud %}. {% data variables.product.prodname_github_connect %} syncs license between {% data variables.product.prodname_ghe_server %} and {% data variables.product.prodname_ghe_cloud %} weekly. For more information, see "[Managing your license for {% data variables.product.prodname_enterprise %}](/billing/managing-your-license-for-github-enterprise)."
|
||||
|
||||
You can also manually upload {% data variables.product.prodname_ghe_server %} user license information to {% data variables.product.prodname_ghe_cloud %}. For more information, see "[Connecting your enterprise account to {% data variables.product.prodname_ghe_cloud %}](/admin/configuration/managing-connections-between-your-enterprise-accounts/connecting-your-enterprise-account-to-github-enterprise-cloud)."
|
||||
You can also manually upload {% data variables.product.prodname_ghe_server %} user license information to {% data variables.product.prodname_ghe_cloud %}. For more information, see "[Syncing license usage between {% data variables.product.prodname_ghe_server %} and {% data variables.product.prodname_ghe_cloud %}](/billing/managing-your-license-for-github-enterprise/syncing-license-usage-between-github-enterprise-server-and-github-enterprise-cloud)."
|
||||
|
||||
## Enabling license synchronization
|
||||
|
||||
Before enabling license synchronization on {% data variables.product.product_location_enterprise %}, you must connect {% data variables.product.product_location_enterprise %} to {% data variables.product.prodname_dotcom_the_website %}. For more information, see "[Connecting your enterprise account to {% data variables.product.prodname_ghe_cloud %}](/admin/configuration/managing-connections-between-your-enterprise-accounts/connecting-your-enterprise-account-to-github-enterprise-cloud)."
|
||||
Before enabling license synchronization on {% data variables.product.product_location %}, you must enable {% data variables.product.prodname_github_connect %}. For more information, see "[Managing {% data variables.product.prodname_github_connect %}](/admin/configuration/configuring-github-connect/managing-github-connect)."
|
||||
|
||||
{% data reusables.enterprise-accounts.access-enterprise %}{% ifversion ghes < 3.1 %}{% data reusables.enterprise-accounts.settings-tab %}{% endif %}{% data reusables.enterprise-accounts.github-connect-tab %}
|
||||
1. Under "Server can sync user license count and usage", use the drop-down menu and select **Enabled**.
|
||||
@@ -1,8 +1,8 @@
|
||||
---
|
||||
title: Enabling the dependency graph and Dependabot alerts on your enterprise account
|
||||
intro: 'You can connect {% data variables.product.product_location %} to {% data variables.product.prodname_ghe_cloud %} and enable the dependency graph and {% data variables.product.prodname_dependabot_alerts %} in repositories in your instance.'
|
||||
title: Enabling the dependency graph and Dependabot alerts for your enterprise
|
||||
intro: 'You can allow users on {% data variables.product.product_location %} to find and fix vulnerabilities in code dependencies by enabling the dependency graph and {% data variables.product.prodname_dependabot_alerts %}.'
|
||||
miniTocMaxHeadingLevel: 3
|
||||
shortTitle: Enable dependency analysis
|
||||
shortTitle: Dependabot
|
||||
redirect_from:
|
||||
- /enterprise/admin/installation/enabling-security-alerts-for-vulnerable-dependencies-on-github-enterprise-server
|
||||
- /enterprise/admin/configuration/enabling-security-alerts-for-vulnerable-dependencies-on-github-enterprise-server
|
||||
@@ -10,6 +10,7 @@ redirect_from:
|
||||
- /admin/configuration/enabling-alerts-for-vulnerable-dependencies-on-github-enterprise-server
|
||||
- /admin/configuration/managing-connections-between-github-enterprise-server-and-github-enterprise-cloud/enabling-alerts-for-vulnerable-dependencies-on-github-enterprise-server
|
||||
- /admin/configuration/managing-connections-between-your-enterprise-accounts/enabling-alerts-for-vulnerable-dependencies-on-github-enterprise-server
|
||||
- /admin/configuration/managing-connections-between-your-enterprise-accounts/enabling-the-dependency-graph-and-dependabot-alerts-on-your-enterprise-account
|
||||
permissions: 'Enterprise owners who are also owners of the connected {% data variables.product.prodname_ghe_cloud %} organization or enterprise account can enable the dependency graph and {% data variables.product.prodname_dependabot_alerts %} on {% data variables.product.product_location %}.'
|
||||
versions:
|
||||
ghes: '*'
|
||||
@@ -36,7 +37,7 @@ For more information about these features, see "[About the dependency graph](/gi
|
||||
|
||||
{% data reusables.repositories.tracks-vulnerabilities %}
|
||||
|
||||
You can connect {% data variables.product.product_location %} to {% data variables.product.prodname_dotcom_the_website %} with {% data variables.product.prodname_github_connect %}. Once connected, vulnerability data is synced from the {% data variables.product.prodname_advisory_database %} to your instance once every hour. You can also choose to manually sync vulnerability data at any time. No code or information about code from {% data variables.product.product_location %} is uploaded to {% data variables.product.prodname_dotcom_the_website %}.
|
||||
You can connect {% data variables.product.product_location %} to {% data variables.product.prodname_ghe_cloud %} with {% data variables.product.prodname_github_connect %}. Once connected, vulnerability data is synced from the {% data variables.product.prodname_advisory_database %} to your instance once every hour. You can also choose to manually sync vulnerability data at any time. No code or information about code from {% data variables.product.product_location %} is uploaded to {% data variables.product.prodname_dotcom_the_website %}.
|
||||
|
||||
Only {% data variables.product.company_short %}-reviewed advisories are synchronized. {% data reusables.security-advisory.link-browsing-advisory-db %}
|
||||
|
||||
@@ -44,7 +45,6 @@ Only {% data variables.product.company_short %}-reviewed advisories are synchron
|
||||
|
||||
For repositories with {% data variables.product.prodname_dependabot_alerts %} enabled, scanning is triggered on any push to the default branch that contains a manifest file or lock file. Additionally, when a new vulnerability record is added to the instance, {% data variables.product.prodname_ghe_server %} scans all existing repositories in that instance and generates alerts for any repository that is vulnerable. For more information, see "[Detection of vulnerable dependencies](/code-security/supply-chain-security/managing-vulnerabilities-in-your-projects-dependencies/about-alerts-for-vulnerable-dependencies#detection-of-vulnerable-dependencies)."
|
||||
|
||||
|
||||
### About generation of {% data variables.product.prodname_dependabot_alerts %}
|
||||
|
||||
If you enable vulnerability detection, when {% data variables.product.product_location %} receives information about a vulnerability, it identifies repositories in your instance that use the affected version of the dependency and generates {% data variables.product.prodname_dependabot_alerts %}. You can choose whether or not to notify users automatically about new {% data variables.product.prodname_dependabot_alerts %}.
|
||||
@@ -54,7 +54,7 @@ If you enable vulnerability detection, when {% data variables.product.product_lo
|
||||
### Prerequisites
|
||||
|
||||
For {% data variables.product.product_location %} to detect vulnerable dependencies and generate {% data variables.product.prodname_dependabot_alerts %}:
|
||||
- You must connect {% data variables.product.product_location %} to {% data variables.product.prodname_dotcom_the_website %}. {% ifversion ghae %}This also enables the dependency graph service. {% endif %}{% ifversion ghes or ghae %}For more information, see "[Connecting your enterprise account to {% data variables.product.prodname_ghe_cloud %}](/admin/configuration/managing-connections-between-your-enterprise-accounts/connecting-your-enterprise-account-to-github-enterprise-cloud)."{% endif %}
|
||||
- You must enable {% data variables.product.prodname_github_connect %}. {% ifversion ghae %}This also enables the dependency graph service.{% endif %}{% ifversion ghes or ghae %}For more information, see "[Managing {% data variables.product.prodname_github_connect %}](/admin/configuration/configuring-github-connect/managing-github-connect)."{% endif %}
|
||||
{% ifversion ghes %}- You must enable the dependency graph service.{% endif %}
|
||||
- You must enable vulnerability scanning.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
---
|
||||
title: Enabling unified contributions between your enterprise account and GitHub.com
|
||||
shortTitle: Enable unified contributions
|
||||
intro: 'After enabling {% data variables.product.prodname_github_connect %}, you can allow {% data variables.product.prodname_ghe_cloud %} members to highlight their work on {% data variables.product.product_name %} by sending the contribution counts to their {% data variables.product.prodname_dotcom_the_website %} profiles.'
|
||||
title: Enabling unified contributions for your enterprise
|
||||
shortTitle: Unified contributions
|
||||
intro: 'You can allow users to include anonymized contribution counts for their work on {% data variables.product.product_location %} in their contribution graphs on {% data variables.product.prodname_dotcom_the_website %}.'
|
||||
redirect_from:
|
||||
- /enterprise/admin/guides/developer-workflow/enabling-unified-contributions-between-github-enterprise-and-github-com
|
||||
- /enterprise/admin/guides/developer-workflow/enabling-unified-contributions-between-github-enterprise-server-and-github-com
|
||||
@@ -10,6 +10,7 @@ redirect_from:
|
||||
- /enterprise/admin/configuration/enabling-unified-contributions-between-github-enterprise-server-and-githubcom
|
||||
- /admin/configuration/enabling-unified-contributions-between-github-enterprise-server-and-githubcom
|
||||
- /admin/configuration/managing-connections-between-github-enterprise-server-and-github-enterprise-cloud/enabling-unified-contributions-between-github-enterprise-server-and-githubcom
|
||||
- /admin/configuration/managing-connections-between-your-enterprise-accounts/enabling-unified-contributions-between-your-enterprise-account-and-githubcom
|
||||
permissions: 'Enterprise owners who are also owners of the connected {% data variables.product.prodname_ghe_cloud %} organization or enterprise account can enable unified contributions between {% data variables.product.product_location %} and {% data variables.product.prodname_dotcom_the_website %}.'
|
||||
versions:
|
||||
ghes: '*'
|
||||
@@ -22,15 +23,21 @@ topics:
|
||||
|
||||
{% data reusables.github-connect.beta %}
|
||||
|
||||
## About unified contributions
|
||||
|
||||
As an enterprise owner, you can allow end users to send anonymized contribution counts for their work from {% data variables.product.product_location %} to their {% data variables.product.prodname_dotcom_the_website %} contribution graph.
|
||||
|
||||
After you enable {% data variables.product.prodname_github_connect %} and enable {% data variables.product.prodname_unified_contributions %} in both environments, end users on your enterprise account can connect to their {% data variables.product.prodname_dotcom_the_website %} accounts and send contribution counts from {% data variables.product.product_name %} to {% data variables.product.prodname_dotcom_the_website %}. {% data reusables.github-connect.sync-frequency %} For more information, see "[Sending enterprise contributions to your {% data variables.product.prodname_dotcom_the_website %} profile](/account-and-profile/setting-up-and-managing-your-github-profile/managing-contribution-graphs-on-your-profile/sending-enterprise-contributions-to-your-githubcom-profile)."
|
||||
After you enable {% data variables.product.prodname_unified_contributions %}, before individual users can send contribution counts from {% data variables.product.product_location %} to {% data variables.product.prodname_dotcom_the_website %}, each user must also connect their personal account on {% data variables.product.product_name %} with a personal account on {% data variables.product.prodname_dotcom_the_website %}. For more information, see "[Sending enterprise contributions to your {% data variables.product.prodname_dotcom_the_website %} profile](/account-and-profile/setting-up-and-managing-your-github-profile/managing-contribution-graphs-on-your-profile/sending-enterprise-contributions-to-your-githubcom-profile)."
|
||||
|
||||
If the enterprise owner disables the functionality or developers opt out of the connection, the {% data variables.product.product_name %} contribution counts will be deleted on {% data variables.product.prodname_dotcom_the_website %}. If the developer reconnects their profiles after disabling them, the contribution counts for the past 90 days are restored.
|
||||
{% data reusables.github-connect.sync-frequency %}
|
||||
|
||||
If the enterprise owner disables the functionality or individual users opt out of the connection, the contribution counts from {% data variables.product.product_name %} will be deleted on {% data variables.product.prodname_dotcom_the_website %}. If the user reconnects their profiles after disabling them, the contribution counts for the past 90 days are restored.
|
||||
|
||||
{% data variables.product.product_name %} **only** sends the contribution count and source ({% data variables.product.product_name %}) for connected users. It does not send any information about the contribution or how it was made.
|
||||
|
||||
Before enabling {% data variables.product.prodname_unified_contributions %} on {% data variables.product.product_location %}, you must connect {% data variables.product.product_location %} to {% data variables.product.prodname_dotcom_the_website %}. For more information, see "[Connecting your enterprise account to {% data variables.product.prodname_dotcom_the_website %}](/admin/configuration/managing-connections-between-your-enterprise-accounts/connecting-your-enterprise-account-to-github-enterprise-cloud)."
|
||||
## Enabling unified contributions
|
||||
|
||||
Before enabling {% data variables.product.prodname_unified_contributions %} on {% data variables.product.product_location %}, you must enable {% data variables.product.prodname_github_connect %}. For more information, see "[Managing {% data variables.product.prodname_github_connect %}](/admin/configuration/configuring-github-connect/managing-github-connect)."
|
||||
|
||||
{% ifversion ghes %}
|
||||
{% data reusables.github-connect.access-dotcom-and-enterprise %}
|
||||
@@ -1,7 +1,7 @@
|
||||
---
|
||||
title: Enabling unified search between your enterprise account and GitHub.com
|
||||
shortTitle: Enable unified search
|
||||
intro: 'After enabling {% data variables.product.prodname_github_connect %}, you can allow search of {% data variables.product.prodname_dotcom_the_website %} for members of your enterprise on {% data variables.product.product_name %}.'
|
||||
title: Enabling unified search for your enterprise
|
||||
shortTitle: Unified search
|
||||
intro: 'You can allow users to include repositories on {% data variables.product.prodname_dotcom_the_website %} in their search results when searching from {% data variables.product.product_location %}.'
|
||||
redirect_from:
|
||||
- /enterprise/admin/guides/developer-workflow/enabling-unified-search-between-github-enterprise-and-github-com
|
||||
- /enterprise/admin/guides/developer-workflow/enabling-unified-search-between-github-enterprise-server-and-github-com
|
||||
@@ -10,6 +10,7 @@ redirect_from:
|
||||
- /enterprise/admin/configuration/enabling-unified-search-between-github-enterprise-server-and-githubcom
|
||||
- /admin/configuration/enabling-unified-search-between-github-enterprise-server-and-githubcom
|
||||
- /admin/configuration/managing-connections-between-github-enterprise-server-and-github-enterprise-cloud/enabling-unified-search-between-github-enterprise-server-and-githubcom
|
||||
- /admin/configuration/managing-connections-between-your-enterprise-accounts/enabling-unified-search-between-your-enterprise-account-and-githubcom
|
||||
permissions: 'Enterprise owners who are also owners of the connected {% data variables.product.prodname_ghe_cloud %} organization or enterprise account can enable unified search between {% data variables.product.product_name %} and {% data variables.product.prodname_dotcom_the_website %}.'
|
||||
versions:
|
||||
ghes: '*'
|
||||
@@ -21,29 +22,32 @@ topics:
|
||||
- GitHub search
|
||||
---
|
||||
|
||||
## About {% data variables.product.prodname_unified_search %}
|
||||
|
||||
{% data reusables.github-connect.beta %}
|
||||
|
||||
When you enable unified search, users can view search results from public and private content on {% data variables.product.prodname_dotcom_the_website %} when searching from {% data variables.product.product_location %}{% ifversion ghae %} on {% data variables.product.prodname_ghe_managed %}{% endif %}.
|
||||
When you enable unified search, users can view search results from content on {% data variables.product.prodname_dotcom_the_website %} when searching from {% data variables.product.product_location %}{% ifversion ghae %} on {% data variables.product.prodname_ghe_managed %}{% endif %}.
|
||||
|
||||
After you enable unified search for {% data variables.product.product_location %}, individual users must also connect their user accounts on {% data variables.product.product_name %} with their user accounts on {% data variables.product.prodname_dotcom_the_website %} in order to see search results from {% data variables.product.prodname_dotcom_the_website %} on {% data variables.product.product_location %}. For more information, see "[Enabling {% data variables.product.prodname_dotcom_the_website %} repository search in your private enterprise account](/search-github/getting-started-with-searching-on-github/enabling-githubcom-repository-search-from-your-private-enterprise-environment)."
|
||||
You can choose to allow search results for public repositories on {% data variables.product.prodname_dotcom_the_website %}, and you can separately choose to allow search results for private repositories on {% data variables.product.prodname_ghe_cloud %}. If you enable unified search for private repositories, users can only search private repositories that they have access to and that are owned by the connected organization or enterprise account. For more information, see "[About searching on {% data variables.product.prodname_dotcom %}](/search-github/getting-started-with-searching-on-github/about-searching-on-github/#searching-across-github-enterprise-and-githubcom-simultaneously)."
|
||||
|
||||
Users will not be able to search {% data variables.product.product_location %} from {% data variables.product.prodname_dotcom_the_website %}, even if they have access to both environments. Users can only search private repositories you've enabled {% data variables.product.prodname_unified_search %} for and that they have access to in the connected {% data variables.product.prodname_ghe_cloud %} organizations. For more information, see "[About searching on {% data variables.product.prodname_dotcom %}](/search-github/getting-started-with-searching-on-github/about-searching-on-github/#searching-across-github-enterprise-and-githubcom-simultaneously)."
|
||||
Users will never be able to search {% data variables.product.product_location %} from {% data variables.product.prodname_dotcom_the_website %}, even if they have access to both environments.
|
||||
|
||||
After you enable unified search for {% data variables.product.product_location %}, before individual users can see search results from {% data variables.product.prodname_dotcom_the_website %} on {% data variables.product.product_location %}, each user must also connect their personal account on {% data variables.product.product_name %} with a personal account on {% data variables.product.prodname_dotcom_the_website %}. For more information, see "[Enabling {% data variables.product.prodname_dotcom_the_website %} repository search in your private enterprise account](/search-github/getting-started-with-searching-on-github/enabling-githubcom-repository-search-from-your-private-enterprise-environment)."
|
||||
|
||||
Searching via the REST and GraphQL APIs does not include {% data variables.product.prodname_dotcom_the_website %} search results. Advanced search and searching for wikis in {% data variables.product.prodname_dotcom_the_website %} are not supported.
|
||||
|
||||
## Enabling {% data variables.product.prodname_unified_search %}
|
||||
|
||||
Before you can enable {% data variables.product.prodname_unified_search %}, you must enable {% data variables.product.prodname_github_connect %}. For more information, see "[Managing {% data variables.product.prodname_github_connect %}](/admin/configuration/configuring-github-connect/managing-github-connect)."
|
||||
|
||||
{% ifversion ghes %}
|
||||
{% data reusables.github-connect.access-dotcom-and-enterprise %}
|
||||
{% data reusables.enterprise_site_admin_settings.access-settings %}
|
||||
{% data reusables.enterprise_site_admin_settings.business %}
|
||||
{% ifversion ghes < 3.1 %}{% data reusables.enterprise-accounts.settings-tab %}{% endif %}{% data reusables.enterprise-accounts.github-connect-tab %}{% else %}
|
||||
1. Sign in to {% data variables.product.product_location %} and {% data variables.product.prodname_dotcom_the_website %}.
|
||||
1. Sign into {% data variables.product.product_location %} and {% data variables.product.prodname_dotcom_the_website %}.
|
||||
{% data reusables.enterprise-accounts.access-enterprise %}{% data reusables.enterprise-accounts.github-connect-tab %}{% endif %}
|
||||
1. Under "Users can search {% data variables.product.prodname_dotcom_the_website %}", use the drop-down menu and click **Enabled**.
|
||||

|
||||
1. Optionally, under "Users can search private repositories on {% data variables.product.prodname_dotcom_the_website %}", use the drop-down menu and click **Enabled**.
|
||||

|
||||
|
||||
## Further reading
|
||||
|
||||
- "[Connecting your enterprise account to {% data variables.product.prodname_ghe_cloud %}](/admin/configuration/managing-connections-between-your-enterprise-accounts/connecting-your-enterprise-account-to-github-enterprise-cloud)"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: Managing connections between your enterprise accounts
|
||||
intro: 'With {% data variables.product.prodname_github_connect %}, you can share certain features and data between {% data variables.product.product_location %} and your {% data variables.product.prodname_ghe_cloud %} organization or enterprise account on {% data variables.product.prodname_dotcom_the_website %}.'
|
||||
title: Configuring GitHub Connect
|
||||
intro: 'With {% data variables.product.prodname_github_connect %}, you can access additional features and workflows by connecting {% data variables.product.product_location %} to {% data variables.product.prodname_ghe_cloud %}.'
|
||||
redirect_from:
|
||||
- /enterprise/admin/developer-workflow/connecting-github-enterprise-to-github-com
|
||||
- /enterprise/admin/guides/developer-workflow/connecting-github-enterprise-and-github-com
|
||||
@@ -9,6 +9,7 @@ redirect_from:
|
||||
- /enterprise/admin/installation/managing-connections-between-github-enterprise-server-and-github-enterprise-cloud
|
||||
- /enterprise/admin/configuration/managing-connections-between-github-enterprise-server-and-github-enterprise-cloud
|
||||
- /admin/configuration/managing-connections-between-github-enterprise-server-and-github-enterprise-cloud
|
||||
- /admin/configuration/managing-connections-between-your-enterprise-accounts
|
||||
versions:
|
||||
ghes: '*'
|
||||
ghae: '*'
|
||||
@@ -16,11 +17,12 @@ type: how_to
|
||||
topics:
|
||||
- Enterprise
|
||||
children:
|
||||
- /connecting-your-enterprise-account-to-github-enterprise-cloud
|
||||
- /enabling-unified-search-between-your-enterprise-account-and-githubcom
|
||||
- /enabling-unified-contributions-between-your-enterprise-account-and-githubcom
|
||||
- /enabling-the-dependency-graph-and-dependabot-alerts-on-your-enterprise-account
|
||||
- /enabling-automatic-user-license-sync-between-github-enterprise-server-and-github-enterprise-cloud
|
||||
shortTitle: Connect enterprise accounts
|
||||
- /about-github-connect
|
||||
- /managing-github-connect
|
||||
- /enabling-automatic-user-license-sync-for-your-enterprise
|
||||
- /enabling-the-dependency-graph-and-dependabot-alerts-for-your-enterprise
|
||||
- /enabling-unified-search-for-your-enterprise
|
||||
- /enabling-unified-contributions-for-your-enterprise
|
||||
shortTitle: GitHub Connect
|
||||
---
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
---
|
||||
title: Connecting your enterprise account to GitHub Enterprise Cloud
|
||||
shortTitle: Connect enterprise accounts
|
||||
intro: 'After you enable {% data variables.product.prodname_github_connect %}, you can share specific features and workflows between {% data variables.product.product_location %} and {% data variables.product.prodname_ghe_cloud %}.'
|
||||
title: Managing GitHub Connect
|
||||
shortTitle: Manage GitHub Connect
|
||||
intro: 'You can enable {% data variables.product.prodname_github_connect %} to access additional features and workflows for {% data variables.product.product_location %}.'
|
||||
redirect_from:
|
||||
- /enterprise/admin/guides/developer-workflow/connecting-github-enterprise-to-github-com
|
||||
- /enterprise/admin/guides/developer-workflow/connecting-github-enterprise-server-to-github-com
|
||||
@@ -10,6 +10,7 @@ redirect_from:
|
||||
- /enterprise/admin/configuration/connecting-github-enterprise-server-to-github-enterprise-cloud
|
||||
- /admin/configuration/connecting-github-enterprise-server-to-github-enterprise-cloud
|
||||
- /admin/configuration/managing-connections-between-github-enterprise-server-and-github-enterprise-cloud/connecting-github-enterprise-server-to-github-enterprise-cloud
|
||||
- /admin/configuration/managing-connections-between-your-enterprise-accounts/connecting-your-enterprise-account-to-github-enterprise-cloud
|
||||
versions:
|
||||
ghes: '*'
|
||||
ghae: '*'
|
||||
@@ -25,45 +26,31 @@ topics:
|
||||
|
||||
## About {% data variables.product.prodname_github_connect %}
|
||||
|
||||
To enable {% data variables.product.prodname_github_connect %}, you must configure the connection in both {% data variables.product.product_location %} and in your {% data variables.product.prodname_ghe_cloud %} organization or enterprise account.
|
||||
You can access additional features and workflows on {% data variables.product.product_location %} by enabling {% data variables.product.prodname_github_connect %}. For more information, see "[About {% data variables.product.prodname_github_connect %}](/admin/configuration/configuring-github-connect/about-github-connect)."
|
||||
|
||||
When you enable {% data variables.product.prodname_github_connect %}, you configure a connection between {% data variables.product.product_location %} and an organization or enterprise account on {% data variables.product.prodname_ghe_cloud %}. Enabling {% data variables.product.prodname_github_connect %} creates a {% data variables.product.prodname_github_app %} owned by the organization or enterprise account on {% data variables.product.prodname_ghe_cloud %}. {% data variables.product.product_name %} uses the {% data variables.product.prodname_github_app %}'s credentials to make requests to {% data variables.product.prodname_ghe_cloud %}.
|
||||
|
||||
{% ifversion ghes %}
|
||||
To configure a connection, your proxy configuration must allow connectivity to `github.com` and `api.github.com`. For more information, see "[Configuring an outbound web proxy server](/enterprise/{{ currentVersion }}/admin/guides/installation/configuring-an-outbound-web-proxy-server)."
|
||||
{% endif %}
|
||||
|
||||
After enabling {% data variables.product.prodname_github_connect %}, you will be able to enable features such as unified search and unified contributions. For more information about all of the features available, see "[Managing connections between your enterprise accounts](/admin/configuration/managing-connections-between-your-enterprise-accounts)."
|
||||
|
||||
When you connect {% data variables.product.product_location %} to {% data variables.product.prodname_ghe_cloud %}, or enable {% data variables.product.prodname_github_connect %} features, a record on {% data variables.product.prodname_dotcom_the_website %} stores information about the connection:
|
||||
{% ifversion ghes %}
|
||||
- The public key portion of your {% data variables.product.prodname_ghe_server %} license
|
||||
- A hash of your {% data variables.product.prodname_ghe_server %} license
|
||||
- The customer name on your {% data variables.product.prodname_ghe_server %} license
|
||||
- The version of {% data variables.product.product_location_enterprise %}{% endif %}
|
||||
- The hostname of {% data variables.product.product_location %}
|
||||
- The organization or enterprise account on {% data variables.product.prodname_dotcom_the_website %} that's connected to {% data variables.product.product_location %}
|
||||
- The authentication token that's used by {% data variables.product.product_location %} to make requests to {% data variables.product.prodname_dotcom_the_website %}
|
||||
- If Transport Layer Security (TLS) is enabled and configured on {% data variables.product.product_location %}{% ifversion ghes %}
|
||||
- The {% data variables.product.prodname_github_connect %} features that are enabled on {% data variables.product.product_location %}, and the date and time of enablement{% endif %}
|
||||
|
||||
{% data variables.product.prodname_github_connect %} syncs the above connection data between {% data variables.product.product_location %} and {% data variables.product.prodname_ghe_cloud %} weekly, from the day and approximate time that {% data variables.product.prodname_github_connect %} was enabled.
|
||||
|
||||
Enabling {% data variables.product.prodname_github_connect %} also creates a {% data variables.product.prodname_github_app %} owned by your {% data variables.product.prodname_ghe_cloud %} organization or enterprise account. {% data variables.product.product_name %} uses the {% data variables.product.prodname_github_app %}'s credentials to make requests to {% data variables.product.prodname_dotcom_the_website %}.
|
||||
{% ifversion ghes %}
|
||||
{% data variables.product.prodname_ghe_server %} stores credentials from the {% data variables.product.prodname_github_app %}. These credentials will be replicated to any high availability or clustering environments, and stored in any backups, including snapshots created by {% data variables.product.prodname_enterprise_backup_utilities %}.
|
||||
{% data variables.product.prodname_ghe_server %} stores credentials from the {% data variables.product.prodname_github_app %}. The following credentials will be replicated to all nodes in a high availability or cluster environment, and stored in any backups, including snapshots created by {% data variables.product.prodname_enterprise_backup_utilities %}.
|
||||
- An authentication token, which is valid for one hour
|
||||
- A private key, which is used to generate a new authentication token
|
||||
{% endif %}
|
||||
|
||||
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.product_name %}.
|
||||
## Prerequisites
|
||||
|
||||
To use {% data variables.product.prodname_github_connect %}, you must have an organization or enterprise account on {% data variables.product.prodname_dotcom_the_website %} that uses {% data variables.product.prodname_ghe_cloud %}. You may already have {% data variables.product.prodname_ghe_cloud %} included in your plan. {% data reusables.enterprise.link-to-ghec-trial %}
|
||||
|
||||
{% ifversion ghes %}
|
||||
To configure a connection, your proxy configuration must allow connectivity to `github.com`, `api.github.com`, and `uploads.github.com`. For more information, see "[Configuring an outbound web proxy server](/enterprise/{{ currentVersion }}/admin/guides/installation/configuring-an-outbound-web-proxy-server)."
|
||||
{% endif %}
|
||||
|
||||
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 %}
|
||||
|
||||
Enterprise owners who are also owners of an organization or enterprise account that uses {% data variables.product.prodname_ghe_cloud %} can enable {% data variables.product.prodname_github_connect %}.
|
||||
|
||||
If you're connecting {% data variables.product.product_location %} to an organization on {% data variables.product.prodname_dotcom_the_website %} that is not owned by an enterprise account, you must enable {% data variables.product.prodname_github_connect %} with a personal account on {% data variables.product.prodname_dotcom_the_website %} that is an owner of the organization.
|
||||
If you're connecting {% data variables.product.product_location %} to an organization on {% data variables.product.prodname_ghe_cloud %} that is not owned by an enterprise account, you must sign into {% data variables.product.prodname_dotcom_the_website %} as an organization owner.
|
||||
|
||||
If you're connecting {% data variables.product.product_location %} to an organization on {% data variables.product.prodname_dotcom_the_website %} that is owned by an enterprise account or to an enterprise account itself, you must enable {% data variables.product.prodname_github_connect %} with a personal account on {% data variables.product.prodname_dotcom_the_website %} that is an owner of the enterprise account.
|
||||
If you're connecting {% data variables.product.product_location %} to an organization on {% data variables.product.prodname_ghe_cloud %} that is owned by an enterprise account or to an enterprise account itself, you must sign into {% data variables.product.prodname_dotcom_the_website %} as an enterprise owner.
|
||||
|
||||
{% ifversion ghes %}
|
||||
1. Sign in to {% data variables.product.product_location %} and {% data variables.product.prodname_dotcom_the_website %}.
|
||||
@@ -32,6 +32,8 @@ You can always reach the {% data variables.enterprise.management_console %} usin
|
||||
|
||||
To access the {% data variables.enterprise.management_console %}, you must use the administrator password established during initial setup of {% data variables.product.product_location %}. You must also be able to connect to the virtual machine host on port 8443. If you're having trouble reaching the {% data variables.enterprise.management_console %}, please check intermediate firewall and security group configurations.
|
||||
|
||||
The {% data variables.enterprise.management_console %} password hash is stored in `/data/user/common/secrets.conf`, and that file is automatically synced from the primary appliance to any high-availability replicas. Any change to the primary's password will automatically be replicated to high-availability replicas. For more information about high availability, see "[About high availability configuration](/admin/enterprise-management/configuring-high-availability/about-high-availability-configuration)."
|
||||
|
||||
## Accessing the {% data variables.enterprise.management_console %} as a site administrator
|
||||
|
||||
The first time that you access the {% data variables.enterprise.management_console %} as a site administrator, you must upload your {% data variables.product.prodname_enterprise %} license file to authenticate into the app. For more information, see "[Managing your license for {% data variables.product.prodname_enterprise %}](/billing/managing-your-license-for-github-enterprise)."
|
||||
|
||||
@@ -836,7 +836,7 @@ This utility will enforce the default organization membership visibility setting
|
||||
ghe-org-membership-update --visibility=<em>SETTING</em>
|
||||
```
|
||||
|
||||
### ghe-user-csv
|
||||
### `ghe-user-csv`
|
||||
|
||||
This utility exports a list of all the users in the installation into CSV format. The CSV file includes the email address, which type of user they are (e.g., admin, user), how many repositories they have, how many SSH keys, how many organization memberships, last logged IP address, etc. Use the `-h` flag for more options.
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ intro: 'You can give users easy access to enterprise-specific links by adding cu
|
||||
versions:
|
||||
ghec: '*'
|
||||
ghes: '>=3.4'
|
||||
ghae: 'issue-5487'
|
||||
type: how_to
|
||||
topics:
|
||||
- Enterprise
|
||||
@@ -14,7 +15,7 @@ Enterprise owners can configure {% data variables.product.product_name %} to sho
|
||||
|
||||

|
||||
|
||||
The custom footer is displayed above the {% data variables.product.prodname_dotcom %} footer {% ifversion ghes or ghae %}to all users, on all pages of {% data variables.product.product_name %}{% else %}to all enterprise members and collaborators, on all repository and organization pages for repositories and organizations that belong to the enterprise{% endif %}.
|
||||
The custom footer is displayed above the {% data variables.product.prodname_dotcom %} footer {% ifversion ghes or ghae %}to all users, on all pages of {% data variables.product.product_name %}{% elsif ghec %}to all enterprise members and collaborators, on all repository and organization pages for repositories and organizations that belong to the enterprise{% endif %}.
|
||||
|
||||
## Configuring custom footers for your enterprise
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ topics:
|
||||
children:
|
||||
- /configuring-your-enterprise
|
||||
- /configuring-network-settings
|
||||
- /managing-connections-between-your-enterprise-accounts
|
||||
- /configuring-github-connect
|
||||
---
|
||||
{% ifversion ghes %}
|
||||
{% note %}
|
||||
|
||||
@@ -1,97 +0,0 @@
|
||||
---
|
||||
title: Connecting your enterprise account to GitHub Enterprise Cloud
|
||||
shortTitle: Connect enterprise accounts
|
||||
intro: 'After you enable {% data variables.product.prodname_github_connect %}, you can share specific features and workflows between {% data variables.product.product_location %} and {% data variables.product.prodname_ghe_cloud %}.'
|
||||
redirect_from:
|
||||
- /enterprise/admin/guides/developer-workflow/connecting-github-enterprise-to-github-com
|
||||
- /enterprise/admin/guides/developer-workflow/connecting-github-enterprise-server-to-github-com
|
||||
- /enterprise/admin/developer-workflow/connecting-github-enterprise-server-to-githubcom
|
||||
- /enterprise/admin/installation/connecting-github-enterprise-server-to-github-enterprise-cloud
|
||||
- /enterprise/admin/configuration/connecting-github-enterprise-server-to-github-enterprise-cloud
|
||||
- /admin/configuration/connecting-github-enterprise-server-to-github-enterprise-cloud
|
||||
- /admin/configuration/managing-connections-between-github-enterprise-server-and-github-enterprise-cloud/connecting-github-enterprise-server-to-github-enterprise-cloud
|
||||
versions:
|
||||
ghes: '*'
|
||||
ghae: '*'
|
||||
type: how_to
|
||||
topics:
|
||||
- Enterprise
|
||||
- GitHub Connect
|
||||
- Infrastructure
|
||||
- Networking
|
||||
---
|
||||
|
||||
{% data reusables.github-connect.beta %}
|
||||
|
||||
## About {% data variables.product.prodname_github_connect %}
|
||||
|
||||
To enable {% data variables.product.prodname_github_connect %}, you must configure the connection in both {% data variables.product.product_location %} and in your {% data variables.product.prodname_ghe_cloud %} organization or enterprise account.
|
||||
|
||||
{% ifversion ghes %}
|
||||
To configure a connection, your proxy configuration must allow connectivity to `github.com` and `api.github.com`. For more information, see "[Configuring an outbound web proxy server](/enterprise/{{ currentVersion }}/admin/guides/installation/configuring-an-outbound-web-proxy-server)."
|
||||
{% endif %}
|
||||
|
||||
After enabling {% data variables.product.prodname_github_connect %}, you will be able to enable features such as unified search and unified contributions. For more information about all of the features available, see "[Managing connections between your enterprise accounts](/admin/configuration/managing-connections-between-your-enterprise-accounts)."
|
||||
|
||||
When you connect {% data variables.product.product_location %} to {% data variables.product.prodname_ghe_cloud %}, or enable {% data variables.product.prodname_github_connect %} features, a record on {% data variables.product.prodname_dotcom_the_website %} stores information about the connection:
|
||||
{% ifversion ghes %}
|
||||
- The public key portion of your {% data variables.product.prodname_ghe_server %} license
|
||||
- A hash of your {% data variables.product.prodname_ghe_server %} license
|
||||
- The customer name on your {% data variables.product.prodname_ghe_server %} license
|
||||
- The version of {% data variables.product.product_location_enterprise %}{% endif %}
|
||||
- The hostname of {% data variables.product.product_location %}
|
||||
- The organization or enterprise account on {% data variables.product.prodname_dotcom_the_website %} that's connected to {% data variables.product.product_location %}
|
||||
- The authentication token that's used by {% data variables.product.product_location %} to make requests to {% data variables.product.prodname_dotcom_the_website %}
|
||||
- If Transport Layer Security (TLS) is enabled and configured on {% data variables.product.product_location %}{% ifversion ghes %}
|
||||
- The {% data variables.product.prodname_github_connect %} features that are enabled on {% data variables.product.product_location %}, and the date and time of enablement{% endif %}
|
||||
|
||||
{% data variables.product.prodname_github_connect %} syncs the above connection data between {% data variables.product.product_location %} and {% data variables.product.prodname_ghe_cloud %} weekly, from the day and approximate time that {% data variables.product.prodname_github_connect %} was enabled.
|
||||
|
||||
Enabling {% data variables.product.prodname_github_connect %} also creates a {% data variables.product.prodname_github_app %} owned by your {% data variables.product.prodname_ghe_cloud %} organization or enterprise account. {% data variables.product.product_name %} uses the {% data variables.product.prodname_github_app %}'s credentials to make requests to {% data variables.product.prodname_dotcom_the_website %}.
|
||||
{% ifversion ghes %}
|
||||
{% data variables.product.prodname_ghe_server %} stores credentials from the {% data variables.product.prodname_github_app %}. These credentials will be replicated to any high availability or clustering environments, and stored in any backups, including snapshots created by {% data variables.product.prodname_enterprise_backup_utilities %}.
|
||||
- An authentication token, which is valid for one hour
|
||||
- A private key, which is used to generate a new authentication token
|
||||
{% endif %}
|
||||
|
||||
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.product_name %}.
|
||||
|
||||
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 %}
|
||||
|
||||
Enterprise owners who are also owners of an organization or enterprise account that uses {% data variables.product.prodname_ghe_cloud %} can enable {% data variables.product.prodname_github_connect %}.
|
||||
|
||||
If you're connecting {% data variables.product.product_location %} to an organization on {% data variables.product.prodname_dotcom_the_website %} that is not owned by an enterprise account, you must enable {% data variables.product.prodname_github_connect %} with a personal account on {% data variables.product.prodname_dotcom_the_website %} that is an owner of the organization.
|
||||
|
||||
If you're connecting {% data variables.product.product_location %} to an organization on {% data variables.product.prodname_dotcom_the_website %} that is owned by an enterprise account or to an enterprise account itself, you must enable {% data variables.product.prodname_github_connect %} with a personal account on {% data variables.product.prodname_dotcom_the_website %} that is an owner of the enterprise account.
|
||||
|
||||
{% ifversion ghes %}
|
||||
1. Sign in to {% data variables.product.product_location %} and {% data variables.product.prodname_dotcom_the_website %}.
|
||||
{% data reusables.enterprise-accounts.access-enterprise %}{% ifversion ghes < 3.1 %}{% data reusables.enterprise-accounts.settings-tab %}{% endif %}{% data reusables.enterprise-accounts.github-connect-tab %}{% else %}
|
||||
1. Sign in to {% data variables.product.product_location %} and {% data variables.product.prodname_dotcom_the_website %}.
|
||||
{% data reusables.enterprise-accounts.access-enterprise %}{% data reusables.enterprise-accounts.github-connect-tab %}{% endif %}
|
||||
1. Under "{% data variables.product.prodname_github_connect %} is not enabled yet", click **Enable {% data variables.product.prodname_github_connect %}**. By clicking **Enable {% data variables.product.prodname_github_connect %}**, you agree to the "<a href="/github/site-policy/github-terms-for-additional-products-and-features#connect" class="dotcom-only">{% data variables.product.prodname_dotcom %} Terms for Additional Products and Features</a>."
|
||||
{% ifversion ghes %}
|
||||
{% else %}
|
||||

|
||||
{% endif %}
|
||||
1. Next to the enterprise account or organization you'd like to connect, click **Connect**.
|
||||

|
||||
|
||||
## Disabling {% data variables.product.prodname_github_connect %}
|
||||
|
||||
Enterprise owners can disable {% data variables.product.prodname_github_connect %}.
|
||||
|
||||
When you disconnect from {% data variables.product.prodname_ghe_cloud %}, the {% data variables.product.prodname_github_connect %} {% data variables.product.prodname_github_app %} is deleted from your enterprise account or organization and credentials stored on {% data variables.product.product_location %} are deleted.
|
||||
|
||||
{% data reusables.enterprise-accounts.access-enterprise %}{% ifversion ghes < 3.1 %}{% data reusables.enterprise-accounts.settings-tab %}{% endif %}{% data reusables.enterprise-accounts.github-connect-tab %}
|
||||
1. Next to the enterprise account or organization you'd like to disconnect, click **Disable {% data variables.product.prodname_github_connect %}**.
|
||||
{% ifversion ghes %}
|
||||

|
||||
1. Read the information about disconnecting and click **Disable {% data variables.product.prodname_github_connect %}**.
|
||||

|
||||
{% else %}
|
||||

|
||||
1. Read the information about disconnecting and click **Disable {% data variables.product.prodname_github_connect %}**.
|
||||

|
||||
{% endif %}
|
||||
@@ -1,47 +0,0 @@
|
||||
---
|
||||
title: Enabling unified contributions between your enterprise account and GitHub.com
|
||||
shortTitle: Enable unified contributions
|
||||
intro: 'After enabling {% data variables.product.prodname_github_connect %}, you can allow {% data variables.product.prodname_ghe_cloud %} members to highlight their work on {% data variables.product.product_name %} by sending the contribution counts to their {% data variables.product.prodname_dotcom_the_website %} profiles.'
|
||||
redirect_from:
|
||||
- /enterprise/admin/guides/developer-workflow/enabling-unified-contributions-between-github-enterprise-and-github-com
|
||||
- /enterprise/admin/guides/developer-workflow/enabling-unified-contributions-between-github-enterprise-server-and-github-com
|
||||
- /enterprise/admin/developer-workflow/enabling-unified-contributions-between-github-enterprise-server-and-githubcom
|
||||
- /enterprise/admin/installation/enabling-unified-contributions-between-github-enterprise-server-and-githubcom
|
||||
- /enterprise/admin/configuration/enabling-unified-contributions-between-github-enterprise-server-and-githubcom
|
||||
- /admin/configuration/enabling-unified-contributions-between-github-enterprise-server-and-githubcom
|
||||
- /admin/configuration/managing-connections-between-github-enterprise-server-and-github-enterprise-cloud/enabling-unified-contributions-between-github-enterprise-server-and-githubcom
|
||||
permissions: 'Enterprise owners who are also owners of the connected {% data variables.product.prodname_ghe_cloud %} organization or enterprise account can enable unified contributions between {% data variables.product.product_location %} and {% data variables.product.prodname_dotcom_the_website %}.'
|
||||
versions:
|
||||
ghes: '*'
|
||||
ghae: '*'
|
||||
type: how_to
|
||||
topics:
|
||||
- Enterprise
|
||||
- GitHub Connect
|
||||
---
|
||||
|
||||
{% data reusables.github-connect.beta %}
|
||||
|
||||
As an enterprise owner, you can allow end users to send anonymized contribution counts for their work from {% data variables.product.product_location %} to their {% data variables.product.prodname_dotcom_the_website %} contribution graph.
|
||||
|
||||
After you enable {% data variables.product.prodname_github_connect %} and enable {% data variables.product.prodname_unified_contributions %} in both environments, end users on your enterprise account can connect to their {% data variables.product.prodname_dotcom_the_website %} accounts and send contribution counts from {% data variables.product.product_name %} to {% data variables.product.prodname_dotcom_the_website %}. {% data reusables.github-connect.sync-frequency %} For more information, see "[Sending enterprise contributions to your {% data variables.product.prodname_dotcom_the_website %} profile](/account-and-profile/setting-up-and-managing-your-github-profile/managing-contribution-graphs-on-your-profile/sending-enterprise-contributions-to-your-githubcom-profile)."
|
||||
|
||||
If the enterprise owner disables the functionality or developers opt out of the connection, the {% data variables.product.product_name %} contribution counts will be deleted on {% data variables.product.prodname_dotcom_the_website %}. If the developer reconnects their profiles after disabling them, the contribution counts for the past 90 days are restored.
|
||||
|
||||
{% data variables.product.product_name %} **only** sends the contribution count and source ({% data variables.product.product_name %}) for connected users. It does not send any information about the contribution or how it was made.
|
||||
|
||||
Before enabling {% data variables.product.prodname_unified_contributions %} on {% data variables.product.product_location %}, you must connect {% data variables.product.product_location %} to {% data variables.product.prodname_dotcom_the_website %}. For more information, see "[Connecting your enterprise account to {% data variables.product.prodname_dotcom_the_website %}](/admin/configuration/managing-connections-between-your-enterprise-accounts/connecting-your-enterprise-account-to-github-enterprise-cloud)."
|
||||
|
||||
{% ifversion ghes %}
|
||||
{% data reusables.github-connect.access-dotcom-and-enterprise %}
|
||||
{% data reusables.enterprise_site_admin_settings.access-settings %}
|
||||
{% data reusables.enterprise_site_admin_settings.business %}
|
||||
{% ifversion ghes < 3.1 %}{% data reusables.enterprise-accounts.settings-tab %}{% endif %}{% data reusables.enterprise-accounts.github-connect-tab %}{% else %}
|
||||
1. Sign in to {% data variables.product.product_location %} and {% data variables.product.prodname_dotcom_the_website %}.
|
||||
{% data reusables.enterprise-accounts.access-enterprise %}{% data reusables.enterprise-accounts.github-connect-tab %}{% endif %}
|
||||
1. Under "Users can share contribution counts to {% data variables.product.prodname_dotcom_the_website %}", click **Request access**.
|
||||
{% ifversion ghes %}
|
||||
2. [Sign in](https://enterprise.github.com/login) to the {% data variables.product.prodname_ghe_server %} site to receive further instructions.
|
||||
|
||||
When you request access, we may redirect you to the {% data variables.product.prodname_ghe_server %} site to check your current terms of service.
|
||||
{% endif %}
|
||||
@@ -1,49 +0,0 @@
|
||||
---
|
||||
title: Enabling unified search between your enterprise account and GitHub.com
|
||||
shortTitle: Enable unified search
|
||||
intro: 'After enabling {% data variables.product.prodname_github_connect %}, you can allow search of {% data variables.product.prodname_dotcom_the_website %} for members of your enterprise on {% data variables.product.product_name %}.'
|
||||
redirect_from:
|
||||
- /enterprise/admin/guides/developer-workflow/enabling-unified-search-between-github-enterprise-and-github-com
|
||||
- /enterprise/admin/guides/developer-workflow/enabling-unified-search-between-github-enterprise-server-and-github-com
|
||||
- /enterprise/admin/developer-workflow/enabling-unified-search-between-github-enterprise-server-and-githubcom
|
||||
- /enterprise/admin/installation/enabling-unified-search-between-github-enterprise-server-and-githubcom
|
||||
- /enterprise/admin/configuration/enabling-unified-search-between-github-enterprise-server-and-githubcom
|
||||
- /admin/configuration/enabling-unified-search-between-github-enterprise-server-and-githubcom
|
||||
- /admin/configuration/managing-connections-between-github-enterprise-server-and-github-enterprise-cloud/enabling-unified-search-between-github-enterprise-server-and-githubcom
|
||||
permissions: 'Enterprise owners who are also owners of the connected {% data variables.product.prodname_ghe_cloud %} organization or enterprise account can enable unified search between {% data variables.product.product_name %} and {% data variables.product.prodname_dotcom_the_website %}.'
|
||||
versions:
|
||||
ghes: '*'
|
||||
ghae: '*'
|
||||
type: how_to
|
||||
topics:
|
||||
- Enterprise
|
||||
- GitHub Connect
|
||||
- GitHub search
|
||||
---
|
||||
|
||||
{% data reusables.github-connect.beta %}
|
||||
|
||||
When you enable unified search, users can view search results from public and private content on {% data variables.product.prodname_dotcom_the_website %} when searching from {% data variables.product.product_location %}{% ifversion ghae %} on {% data variables.product.prodname_ghe_managed %}{% endif %}.
|
||||
|
||||
After you enable unified search for {% data variables.product.product_location %}, individual users must also connect their user accounts on {% data variables.product.product_name %} with their user accounts on {% data variables.product.prodname_dotcom_the_website %} in order to see search results from {% data variables.product.prodname_dotcom_the_website %} on {% data variables.product.product_location %}. For more information, see "[Enabling {% data variables.product.prodname_dotcom_the_website %} repository search in your private enterprise account](/search-github/getting-started-with-searching-on-github/enabling-githubcom-repository-search-from-your-private-enterprise-environment)."
|
||||
|
||||
Users will not be able to search {% data variables.product.product_location %} from {% data variables.product.prodname_dotcom_the_website %}, even if they have access to both environments. Users can only search private repositories you've enabled {% data variables.product.prodname_unified_search %} for and that they have access to in the connected {% data variables.product.prodname_ghe_cloud %} organizations. For more information, see "[About searching on {% data variables.product.prodname_dotcom %}](/search-github/getting-started-with-searching-on-github/about-searching-on-github/#searching-across-github-enterprise-and-githubcom-simultaneously)."
|
||||
|
||||
Searching via the REST and GraphQL APIs does not include {% data variables.product.prodname_dotcom_the_website %} search results. Advanced search and searching for wikis in {% data variables.product.prodname_dotcom_the_website %} are not supported.
|
||||
|
||||
{% ifversion ghes %}
|
||||
{% data reusables.github-connect.access-dotcom-and-enterprise %}
|
||||
{% data reusables.enterprise_site_admin_settings.access-settings %}
|
||||
{% data reusables.enterprise_site_admin_settings.business %}
|
||||
{% ifversion ghes < 3.1 %}{% data reusables.enterprise-accounts.settings-tab %}{% endif %}{% data reusables.enterprise-accounts.github-connect-tab %}{% else %}
|
||||
1. Sign in to {% data variables.product.product_location %} and {% data variables.product.prodname_dotcom_the_website %}.
|
||||
{% data reusables.enterprise-accounts.access-enterprise %}{% data reusables.enterprise-accounts.github-connect-tab %}{% endif %}
|
||||
1. Under "Users can search {% data variables.product.prodname_dotcom_the_website %}", use the drop-down menu and click **Enabled**.
|
||||

|
||||
1. Optionally, under "Users can search private repositories on {% data variables.product.prodname_dotcom_the_website %}", use the drop-down menu and click **Enabled**.
|
||||

|
||||
|
||||
## Further reading
|
||||
|
||||
- "[Connecting your enterprise account to {% data variables.product.prodname_ghe_cloud %}](/admin/configuration/managing-connections-between-your-enterprise-accounts/connecting-your-enterprise-account-to-github-enterprise-cloud)"
|
||||
|
||||