Skip to content
Merged
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
14 changes: 8 additions & 6 deletions .github/workflows/update-doc-db.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
name: Update doc DB

permissions:
contents: write
pull-requests: write
permissions: {}

on:
workflow_dispatch:
Expand All @@ -22,6 +20,8 @@

jobs:
generate:
permissions:
contents: read
runs-on: ${{ matrix.os }}
strategy:
matrix:
Expand Down Expand Up @@ -54,17 +54,19 @@
merge:
runs-on: ubuntu-latest
needs: generate
permissions:
contents: write
pull-requests: write
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: true
ref: ${{ inputs.base-ref }}
token: ${{ secrets.AUTO_COMMIT_PAT }}

- name: Create update branch
run: git switch -c "update-doc-${PYTHON_VERSION}"
env:
PYTHON_VERSION: ${{ inputs.python-version }}
run: git switch -c "update-doc-${PYTHON_VERSION}"

- name: Download generated doc DBs
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
Expand All @@ -76,7 +78,7 @@
- name: Transform JSON
env:
PYTHON_VERSION: ${{ inputs.python-version }}
run: |

Check failure on line 81 in .github/workflows/update-doc-db.yml

View workflow job for this annotation

GitHub Actions / format_check

[actionlint] reported by reviewdog 🐶 shellcheck reported issue in this script: SC2129:style:11:1: Consider using { cmd1; cmd2; } >> file instead of individual redirects [shellcheck] Raw Output: e:.github/workflows/update-doc-db.yml:81:9: shellcheck reported issue in this script: SC2129:style:11:1: Consider using { cmd1; cmd2; } >> file instead of individual redirects [shellcheck]

Check warning on line 81 in .github/workflows/update-doc-db.yml

View workflow job for this annotation

GitHub Actions / format_check

[actionlint] reported by reviewdog 🐶 shellcheck reported issue in this script: SC2016:info:11:6: Expressions don't expand in single quotes, use double quotes for that [shellcheck] Raw Output: i:.github/workflows/update-doc-db.yml:81:9: shellcheck reported issue in this script: SC2016:info:11:6: Expressions don't expand in single quotes, use double quotes for that [shellcheck]
# Merge all artifacts
jq -s "add" --sort-keys crates/doc/generated/*.json > crates/doc/generated/merged.json

Expand Down Expand Up @@ -107,7 +109,7 @@

- name: Commit, push and create PR
env:
GH_TOKEN: ${{ secrets.AUTO_COMMIT_PAT }}
GH_TOKEN: ${{ github.token }}
PYTHON_VERSION: ${{ inputs.python-version }}
BASE_REF: ${{ inputs.base-ref }}
run: |
Expand Down
Loading