ci: create PR instead of push autogenerated docs (#7988)

This commit is contained in:
Ville Vesilehto
2026-03-31 00:40:01 +03:00
committed by GitHub
parent 2ba4340362
commit 1df23e0e86

View File

@@ -12,6 +12,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
permissions: permissions:
contents: write contents: write
pull-requests: write
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
@@ -26,18 +27,13 @@ jobs:
bash -x -e ./.github/fixup_file_mtime.sh bash -x -e ./.github/fixup_file_mtime.sh
make -f Makefile.doc make -f Makefile.doc
- name: Set up Git - name: Create Pull Request
env: uses: peter-evans/create-pull-request@c0f553fe549906ede9cf27b5156039d195d2ece0 # v8.1.0
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with:
run: | commit-message: 'auto make -f Makefile.doc'
git config user.name "coredns[bot]" title: 'Update generated documentation'
git config user.email "bot@bot.coredns.io" body: 'Automated doc generation via `make -f Makefile.doc`'
git remote set-url origin https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git branch: bot/make-doc
committer: 'coredns[bot] <bot@coredns.io>'
- name: Commit and push changes author: 'coredns[bot] <bot@coredns.io>'
run: | signoff: true
git add .
if output=$(git status --porcelain) && [ ! -z "$output" ]; then
git commit -s -m 'auto make -f Makefile.doc'
git push
fi