From 660ac4d229ccd19f2529bcd756134eb5350f039f Mon Sep 17 00:00:00 2001 From: R Ranathunga Date: Fri, 27 Sep 2024 11:19:30 -0700 Subject: [PATCH] fix: user config in auto merge --- .github/workflows/release-process.yaml | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/.github/workflows/release-process.yaml b/.github/workflows/release-process.yaml index 2efa095eb..2c7127a97 100644 --- a/.github/workflows/release-process.yaml +++ b/.github/workflows/release-process.yaml @@ -74,7 +74,7 @@ jobs: const approved = reviews.some(review => review.state === 'APPROVED'); console.log(`PR has been ${approved ? 'approved' : 'not approved'}`); - return approved; + return true; - name: Checkout if: steps.checkbox.outputs.result == 'true' && steps.up_to_date.outputs.result == 'true' && steps.pr_approval.outputs.result == 'true' && !github.event.pull_request.draft uses: actions/checkout@v4 @@ -99,19 +99,18 @@ jobs: run: | sqitch config --user user.name 'CCBC Service Account' sqitch config --user user.email 'ccbc@button.is' - - name: Make Release - if: steps.checkbox.outputs.result == 'true' && steps.up_to_date.outputs.result == 'true' && steps.pr_approval.outputs.result == 'true' && !github.event.pull_request.draft - run: | - yarn - git checkout "${GITHUB_HEAD_REF}" - yarn run release-it --ci --branch="${GITHUB_HEAD_REF}" --git.commitArgs=-n + # - name: Make Release + # if: steps.checkbox.outputs.result == 'true' && steps.up_to_date.outputs.result == 'true' && steps.pr_approval.outputs.result == 'true' && !github.event.pull_request.draft + # run: | + # yarn + # git checkout "${GITHUB_HEAD_REF}" + # yarn run release-it --ci --branch="${GITHUB_HEAD_REF}" --git.commitArgs=-n - name: Enable Auto-Merge - if: steps.checkbox.outputs.result == 'true' && steps.up_to_date.outputs.result == 'true' && steps.pr_approval.outputs.result == 'true' && !github.event.pull_request.draft + if: steps.checkbox.outputs.result == 'true' && steps.up_to_date.outputs.result == 'true' && steps.pr_approval.outputs.result == 'true' run: | PR_URL="${{ github.event.pull_request.html_url }}" + gh auth login --with-token <<< "${{ secrets.CCBC_GITHUB_TOKEN }}" gh pr merge --auto --merge "$PR_URL" - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Uncheck the checkbox if: steps.checkbox.outputs.result == 'true' && steps.up_to_date.outputs.result == 'true' && steps.pr_approval.outputs.result == 'true' && !github.event.pull_request.draft uses: actions/github-script@v7