From 1df23e0e86cc1729324de69716cd55b93e915631 Mon Sep 17 00:00:00 2001 From: Ville Vesilehto Date: Tue, 31 Mar 2026 00:40:01 +0300 Subject: [PATCH] ci: create PR instead of push autogenerated docs (#7988) --- .github/workflows/make.doc.yml | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/.github/workflows/make.doc.yml b/.github/workflows/make.doc.yml index 81ca68bd8..ce2ee66c5 100644 --- a/.github/workflows/make.doc.yml +++ b/.github/workflows/make.doc.yml @@ -12,6 +12,7 @@ jobs: runs-on: ubuntu-latest permissions: contents: write + pull-requests: write steps: - name: Checkout uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 @@ -26,18 +27,13 @@ jobs: bash -x -e ./.github/fixup_file_mtime.sh make -f Makefile.doc - - name: Set up Git - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - git config user.name "coredns[bot]" - git config user.email "bot@bot.coredns.io" - git remote set-url origin https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git - - - name: Commit and push changes - run: | - git add . - if output=$(git status --porcelain) && [ ! -z "$output" ]; then - git commit -s -m 'auto make -f Makefile.doc' - git push - fi + - name: Create Pull Request + uses: peter-evans/create-pull-request@c0f553fe549906ede9cf27b5156039d195d2ece0 # v8.1.0 + with: + commit-message: 'auto make -f Makefile.doc' + title: 'Update generated documentation' + body: 'Automated doc generation via `make -f Makefile.doc`' + branch: bot/make-doc + committer: 'coredns[bot] ' + author: 'coredns[bot] ' + signoff: true