mirror of
https://github.com/coredns/coredns.git
synced 2026-04-05 03:35:33 -04:00
ci: create PR instead of push autogenerated docs (#7988)
This commit is contained in:
26
.github/workflows/make.doc.yml
vendored
26
.github/workflows/make.doc.yml
vendored
@@ -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
|
|
||||||
|
|||||||
Reference in New Issue
Block a user