From e89525fe315744066530f0adbd59ff894b3c4dff Mon Sep 17 00:00:00 2001 From: Francisco Diaz Date: Fri, 10 Apr 2026 00:16:33 +0200 Subject: [PATCH] ci: enable auto-merge step --- .github/workflows/pull-request.yml | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 34c5361..7d36fc4 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -26,12 +26,13 @@ jobs: for file in ${{ steps.files.outputs.all_changed_files }}; do if [[ ! "$file" =~ \.md$ ]]; then - echo "Non-markdown file detected: $file" + echo "Non-markdown file detected: $file. PR WILL NOT BE MERGED" echo "only_markdown=false" >> $GITHUB_OUTPUT exit 0 fi done - + + echo "All changed files are markdown files. PR WILL BE MERGED" echo "only_markdown=true" >> $GITHUB_OUTPUT - name: Install GH CLI @@ -39,11 +40,11 @@ jobs: with: gh-cli-version: 2.49.2 -# - name: Enable auto-merge -# if: steps.check.outputs.only_markdown == 'true' -# run: | -# gh pr merge ${{ github.event.pull_request.number }} \ -# --auto \ -# --merge -# env: -# GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + - name: Enable auto-merge + if: steps.check.outputs.only_markdown == 'true' + run: | + gh pr merge ${{ github.event.pull_request.number }} \ + --auto \ + --merge + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}