Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions .github/actions/clone-translations/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,56 +11,56 @@ runs:
using: 'composite'
steps:
- name: Clone Spanish
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
repository: github/docs-internal.es-es
token: ${{ inputs.token }}
path: translations/es-es

- name: Clone Japanese
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
repository: github/docs-internal.ja-jp
token: ${{ inputs.token }}
path: translations/ja-jp

- name: Clone Portuguese
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
repository: github/docs-internal.pt-br
token: ${{ inputs.token }}
path: translations/pt-br

- name: Clone Simplified Chinese
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
repository: github/docs-internal.zh-cn
token: ${{ inputs.token }}
path: translations/zh-cn

- name: Clone Russian
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
repository: github/docs-internal.ru-ru
token: ${{ inputs.token }}
path: translations/ru-ru

- name: Clone French
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
repository: github/docs-internal.fr-fr
token: ${{ inputs.token }}
path: translations/fr-fr

- name: Clone Korean
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
repository: github/docs-internal.ko-kr
token: ${{ inputs.token }}
path: translations/ko-kr

- name: Clone German
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
repository: github/docs-internal.de-de
token: ${{ inputs.token }}
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/get-docs-early-access/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ runs:
run: npm run what-docs-early-access-branch

- name: Clone
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
repository: github/docs-early-access
token: ${{ inputs.token }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/enterprise-dates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ jobs:

- if: ${{ steps.create-pull-request.outputs.pull-request-number }}
name: Approve
uses: juliangruber/approve-pull-request-action@dcc4effb325c0b503408619918d56e40653dcc91
uses: juliangruber/approve-pull-request-action@68fcc9a5a73b5641cadf757cf99d73720dcb05d0 # v2.1.0
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
number: ${{ steps.create-pull-request.outputs.pull-request-number }}
Expand Down
14 changes: 12 additions & 2 deletions .github/workflows/link-check-on-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,20 @@ jobs:

- uses: ./.github/actions/node-npm-setup

- name: Generate GitHub App token
if: ${{ github.repository == 'github/docs-internal' }}
id: app-token
uses: actions/create-github-app-token@3ff1caaa28b64c9cc276ce0a02e2ff584f3900c5 # v2.0.2
with:
app-id: ${{ secrets.DOCS_BOT_APP_ID }}
private-key: ${{ secrets.DOCS_BOT_APP_PRIVATE_KEY }}
owner: github
repositories: docs-early-access

- uses: ./.github/actions/get-docs-early-access
if: ${{ github.repository == 'github/docs-internal' }}
with:
token: ${{ secrets.DOCS_BOT_PAT_BASE }}
token: ${{ steps.app-token.outputs.token }}

- name: Get changed files
id: changed-files
Expand All @@ -55,7 +65,7 @@ jobs:
FILES_CHANGED: ${{ steps.changed-files.outputs.all_changed_files }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ACTION_RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
SHOULD_COMMENT: ${{ secrets.DOCS_BOT_PAT_BASE != '' }}
SHOULD_COMMENT: ${{ secrets.DOCS_BOT_APP_ID != '' }}
FAIL_ON_FLAW: true
ENABLED_LANGUAGES: en
run: npm run check-links-pr
Expand Down
19 changes: 14 additions & 5 deletions .github/workflows/move-ready-to-merge-pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,21 @@ jobs:
}}
runs-on: ubuntu-latest
steps:
- name: move PR
uses: alex-page/github-project-automation-plus@303f24a24c67ce7adf565a07e96720faf126fe36
- name: Add PR to the open source board
uses: actions/add-to-project@5afcf98fcd03f1c2f92c3c83f58ae24323cc57fd # v2.0.0
with:
project: Docs open source board
column: Triage
repo-token: ${{ secrets.DOCS_BOT_PAT_BASE }}
project-url: https://github.com/orgs/github/projects/2936
github-token: ${{ secrets.DOCS_BOT_PAT_BASE }}

- name: Move PR to Triage on the open source board
uses: github/update-project-action@af4f6083118f5080c89828b421ef598d1906fb60 # v4
with:
github_token: ${{ secrets.DOCS_BOT_PAT_BASE }}
organization: github
project_number: 2936
content_id: ${{ github.event.pull_request.node_id }}
field: Status
value: Triage

- name: Check out repo
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sync-graphql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:

- if: ${{ steps.create-pull-request.outputs.pull-request-number }}
name: Approve
uses: juliangruber/approve-pull-request-action@dcc4effb325c0b503408619918d56e40653dcc91
uses: juliangruber/approve-pull-request-action@68fcc9a5a73b5641cadf757cf99d73720dcb05d0 # v2.1.0
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
number: ${{ steps.create-pull-request.outputs.pull-request-number }}
Expand Down
12 changes: 11 additions & 1 deletion .github/workflows/test-changed-content.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,20 @@ jobs:

- uses: ./.github/actions/node-npm-setup

- name: Generate GitHub App token
if: ${{ github.repository == 'github/docs-internal' }}
id: app-token
uses: actions/create-github-app-token@3ff1caaa28b64c9cc276ce0a02e2ff584f3900c5 # v2.0.2
with:
app-id: ${{ secrets.DOCS_BOT_APP_ID }}
private-key: ${{ secrets.DOCS_BOT_APP_PRIVATE_KEY }}
owner: github
repositories: docs-early-access

- uses: ./.github/actions/get-docs-early-access
if: ${{ github.repository == 'github/docs-internal' }}
with:
token: ${{ secrets.DOCS_BOT_PAT_BASE }}
token: ${{ steps.app-token.outputs.token }}

- uses: ./.github/actions/cache-nextjs

Expand Down
14 changes: 12 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,20 @@ jobs:

- uses: ./.github/actions/node-npm-setup

- name: Generate GitHub App token
if: ${{ github.repository == 'github/docs-internal' }}
id: app-token
uses: actions/create-github-app-token@3ff1caaa28b64c9cc276ce0a02e2ff584f3900c5 # v2.0.2
with:
app-id: ${{ secrets.DOCS_BOT_APP_ID }}
private-key: ${{ secrets.DOCS_BOT_APP_PRIVATE_KEY }}
owner: github
repositories: docs-early-access,docs-internal.es-es,docs-internal.ja-jp,docs-internal.pt-br,docs-internal.zh-cn,docs-internal.ru-ru,docs-internal.fr-fr,docs-internal.ko-kr,docs-internal.de-de

- uses: ./.github/actions/get-docs-early-access
if: ${{ github.repository == 'github/docs-internal' }}
with:
token: ${{ secrets.DOCS_BOT_PAT_BASE }}
token: ${{ steps.app-token.outputs.token }}

- name: Check the test fixture data (if applicable)
if: ${{ matrix.name == 'fixtures' }}
Expand All @@ -123,7 +133,7 @@ jobs:
if: ${{ matrix.name == 'languages' }}
uses: ./.github/actions/clone-translations
with:
token: ${{ secrets.DOCS_BOT_PAT_BASE }}
token: ${{ steps.app-token.outputs.token }}

- name: Gather files changed
if: ${{ matrix.name == 'content-linter' }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/triage-unallowed-contributions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1

- name: Get files changed
uses: dorny/paths-filter@fbd0ab8f3e69293af611ebaee6363fc25e6d187d
uses: dorny/paths-filter@fbd0ab8f3e69293af611ebaee6363fc25e6d187d # v4.0.1
id: filter
with:
# Base branch used to get changed files
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,24 @@ jobs:
# Add any steps to download and setup any dependencies here
```

### Conditionals

The `snapshot` keyword supports conditional execution using the `if` keyword around the snapshot mapping. You can use conditions to control when an image snapshot is created. For example, the following job skips image creation for tag builds.

```yaml
jobs:
build:
runs-on: my-image-generation-runner
snapshot:
if: {% raw %}${{ ! startsWith(github.ref, 'refs/tags/') }}{% endraw %}
image-name: my-custom-image
version: 2.*
steps:
# Add any steps to download and setup any dependencies here
```

For more information about the `if` keyword, see [AUTOTITLE](/actions/how-tos/write-workflows/choose-when-workflows-run/control-jobs-with-conditions).

## Versioning

When you generate custom images, {% data variables.product.github %} automatically assigns version numbers to help you manage updates and track image history.
Expand Down
Loading
Loading