From 9d859bc378aacd1f91ce556aa525d08fb72dfa7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Charles-Edouard=20Br=C3=A9t=C3=A9ch=C3=A9?= Date: Wed, 28 Jun 2023 15:26:22 +0200 Subject: [PATCH] fix: pr updater workflow (#7697) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: pr updater workflow Signed-off-by: Charles-Edouard Brétéché * Update .github/workflows/pr-update.yaml Signed-off-by: Charles-Edouard Brétéché --------- Signed-off-by: Charles-Edouard Brétéché Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .github/workflows/pr-update.yaml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pr-update.yaml b/.github/workflows/pr-update.yaml index 8a022e93de..8d72b6ce97 100644 --- a/.github/workflows/pr-update.yaml +++ b/.github/workflows/pr-update.yaml @@ -11,16 +11,21 @@ permissions: {} jobs: autoupdate: permissions: - contents: write - pull-requests: write + contents: read runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + - name: Check secret + id: checksecret + uses: ./.github/actions/is-defined + with: + value: ${{ secrets.PR_UPDATE_TOKEN }} - name: Automatically update PR + if: steps.checksecret.outputs.result == 'true' uses: adRise/update-pr-branch@437fab6e0ac7d2a668f2c479f64225edd7f303fd # v0.6.0 with: - token: ${{ secrets.GITHUB_TOKEN }} + token: ${{ secrets.PR_UPDATE_TOKEN }} base: ${{ github.ref_name }} required_approval_count: 1 require_passed_checks: false