зеркало из https://github.com/github/docs.git
use a composite action for getting docs-early-access in tests (#35145)
This commit is contained in:
Родитель
88a78574c4
Коммит
bf91d243f0
|
@ -0,0 +1,33 @@
|
|||
name: Clone and add docs-early-access
|
||||
|
||||
description: Clone docs-early-access and copy its content into the repo
|
||||
|
||||
inputs:
|
||||
token:
|
||||
description: PAT
|
||||
required: true
|
||||
|
||||
runs:
|
||||
using: 'composite'
|
||||
steps:
|
||||
- name: Figure out which branch to checkout
|
||||
id: check-early-access
|
||||
env:
|
||||
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
|
||||
GITHUB_TOKEN: ${{ inputs.token }}
|
||||
shell: bash
|
||||
run: node .github/actions-scripts/what-docs-early-access-branch.js
|
||||
|
||||
- name: Clone
|
||||
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
|
||||
with:
|
||||
repository: github/docs-early-access
|
||||
token: ${{ inputs.token }}
|
||||
path: docs-early-access
|
||||
ref: ${{ steps.check-early-access.outputs.branch }}
|
||||
|
||||
- name: Merge docs-early-access repo's folders
|
||||
shell: bash
|
||||
run: |
|
||||
.github/actions-scripts/merge-early-access.sh
|
||||
rm -fr docs-early-access
|
|
@ -88,28 +88,10 @@ jobs:
|
|||
|
||||
- uses: ./.github/actions/node-npm-setup
|
||||
|
||||
- name: Figure out which docs-early-access branch to checkout, if internal repo
|
||||
- uses: ./.github/actions/get-docs-early-access
|
||||
if: ${{ github.repository == 'github/docs-internal' }}
|
||||
id: check-early-access
|
||||
env:
|
||||
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
|
||||
GITHUB_TOKEN: ${{ secrets.DOCUBOT_REPO_PAT }}
|
||||
run: node .github/actions-scripts/what-docs-early-access-branch.js
|
||||
|
||||
- name: Check out docs-early-access too, if internal repo
|
||||
if: ${{ github.repository == 'github/docs-internal' }}
|
||||
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
|
||||
with:
|
||||
repository: github/docs-early-access
|
||||
token: ${{ secrets.DOCUBOT_REPO_PAT }}
|
||||
path: docs-early-access
|
||||
ref: ${{ steps.check-early-access.outputs.branch }}
|
||||
|
||||
- name: Merge docs-early-access repo's folders
|
||||
if: ${{ github.repository == 'github/docs-internal' }}
|
||||
run: |
|
||||
.github/actions-scripts/merge-early-access.sh
|
||||
rm -fr docs-early-access
|
||||
|
||||
- name: Check the test fixture data (if applicable)
|
||||
if: ${{ matrix.test-group == 'rendering-fixtures' }}
|
||||
|
|
Загрузка…
Ссылка в новой задаче