Merge branch 'main' into build-changelog
This commit is contained in:
20
.github/workflows/check-all-english-links.yml
vendored
20
.github/workflows/check-all-english-links.yml
vendored
@@ -17,16 +17,34 @@ jobs:
|
||||
- name: npm run build
|
||||
run: npm run build
|
||||
- name: Run script
|
||||
run: script/check-english-links.js > broken_links.md
|
||||
run: |
|
||||
script/check-english-links.js > broken_links.md
|
||||
echo -e '\ncc @github/docs-content'>> broken_links.md
|
||||
- if: ${{ failure() }}
|
||||
name: Get title for issue
|
||||
id: check
|
||||
run: echo "::set-output name=title::$(head -1 broken_links.md)"
|
||||
- if: ${{ failure() }}
|
||||
name: Close previous report
|
||||
uses: lee-dohm/close-matching-issues@22002609b2555fe18f52b8e2e7c07cbf5529e8a8
|
||||
with:
|
||||
query: 'label:"broken+link+report"'
|
||||
token: ${{ secrets.DOCUBOT_FR_PROJECT_BOARD_WORKFLOWS_REPO_ORG_READ_SCOPES }}
|
||||
- if: ${{ failure() }}
|
||||
name: Create issue from file
|
||||
id: broken-link-report
|
||||
uses: peter-evans/create-issue-from-file@a04ce672e3acedb1f8e416b46716ddfd09905326
|
||||
with:
|
||||
token: ${{ secrets.DOCUBOT_FR_PROJECT_BOARD_WORKFLOWS_REPO_ORG_READ_SCOPES }}
|
||||
title: ${{ steps.check.outputs.title }}
|
||||
content-filepath: ./broken_links.md
|
||||
labels: broken link report
|
||||
- if: ${{ failure() }}
|
||||
name: Add issue to FR project board
|
||||
uses: peter-evans/create-or-update-project-card@80140aaeb9730972a83c626031250621fe8f6670
|
||||
with:
|
||||
project-repository: 'github'
|
||||
project-number: '1367'
|
||||
column-name: 'Docs-content FR issues'
|
||||
issue-number: ${{ steps.broken-link-report.outputs.issue-number }}
|
||||
token: ${{ secrets.DOCUBOT_FR_PROJECT_BOARD_WORKFLOWS_REPO_ORG_READ_SCOPES }}
|
||||
|
||||
32
.github/workflows/openapi-decorate.yml
vendored
Normal file
32
.github/workflows/openapi-decorate.yml
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
name: OpenAPI generate decorated schema files
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
pull_request:
|
||||
types: [opened]
|
||||
|
||||
jobs:
|
||||
generate-decorated-files:
|
||||
if: github.event.pull_request.user.login == 'github-openapi-bot'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository code
|
||||
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Decorate the dereferenced OpenAPI schemas
|
||||
run: script/rest/update-files.js --decorate-only
|
||||
|
||||
- name: Check in the decorated files
|
||||
uses: EndBug/add-and-commit@9358097a71ad9fb9e2f9624c6098c89193d83575
|
||||
with:
|
||||
# The arguments for the `git add` command
|
||||
add: 'lib/rest/static/decorated'
|
||||
|
||||
# The message for the commit
|
||||
message: 'Add decorated OpenAPI schema files'
|
||||
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Leave this line unchanged
|
||||
22
.github/workflows/openapi-schema-check.yml
vendored
Normal file
22
.github/workflows/openapi-schema-check.yml
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
name: OpenAPI dev mode check
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
|
||||
jobs:
|
||||
check-schema-versions:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository code
|
||||
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
|
||||
# Differences between decorated and dereferenced files indicates a problem
|
||||
- name: Generate decorated files to check that there are no differences
|
||||
run: script/rest/update-files.js --decorate-only
|
||||
|
||||
- name: Check if deref/decorated schemas are dev mode and that they match
|
||||
run: .github/actions-scripts/openapi-schema-branch.js
|
||||
@@ -3,6 +3,8 @@ name: Algolia Sync Single English Index
|
||||
on:
|
||||
pull_request:
|
||||
types:
|
||||
- labeled
|
||||
- unlabeled
|
||||
- opened
|
||||
- reopened
|
||||
- synchronize
|
||||
@@ -13,7 +15,7 @@ on:
|
||||
jobs:
|
||||
updateIndices:
|
||||
name: Update English index for single version based on a label's version
|
||||
if: github.repository == 'github/docs-internal' && startsWith(github.event.label.name, 'sync-english-index-for-')
|
||||
if: github.repository == 'github/docs-internal'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: checkout
|
||||
@@ -30,13 +32,13 @@ jobs:
|
||||
${{ runner.os }}-node-
|
||||
- name: npm ci
|
||||
run: npm ci
|
||||
- name: Get version from label
|
||||
- name: Get version from Algolia label if present; only continue if the label is found.
|
||||
id: getVersion
|
||||
run: |
|
||||
echo "::set-output name=version::$(github.event.label.name.split('sync-english-index-for-')[1])"
|
||||
- name: Sync English index for single version
|
||||
run: $GITHUB_WORKSPACE/.github/actions-scripts/enterprise-algolia-label.js
|
||||
- if: ${{ steps.getVersion.outputs.versionToSync }}
|
||||
name: Sync English index for single version
|
||||
env:
|
||||
VERSION: ${{ steps.getVersion.outputs.version }}
|
||||
VERSION: ${{ steps.getVersion.outputs.versionToSync }}
|
||||
LANGUAGE: 'en'
|
||||
ALGOLIA_APPLICATION_ID: ${{ secrets.ALGOLIA_APPLICATION_ID }}
|
||||
ALGOLIA_API_KEY: ${{ secrets.ALGOLIA_API_KEY }}
|
||||
|
||||
Reference in New Issue
Block a user