From c80b07de2f91bd569e876f93d82357c7f4cebdf5 Mon Sep 17 00:00:00 2001 From: Chris Schinnerl Date: Wed, 6 Nov 2024 09:31:04 +0100 Subject: [PATCH] formula-update.yml: update create pull request action and add permissions --- .github/workflows/formula-update.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/formula-update.yml b/.github/workflows/formula-update.yml index d768b52..ec0b5ee 100644 --- a/.github/workflows/formula-update.yml +++ b/.github/workflows/formula-update.yml @@ -14,6 +14,10 @@ on: required: true default: "renterd" +permissions: + contents: write + pull-requests: write + jobs: update-formula: runs-on: ubuntu-latest @@ -36,9 +40,9 @@ jobs: sed -i 's/tag: "[^"]*"/tag: "${{ env.RELEASE_TAG }}"/' ./Formula/${{ env.PROJECT }}.rb - name: Create Pull Request - uses: peter-evans/create-pull-request@v5.0.2 + uses: peter-evans/create-pull-request@v7 with: - token: ${{ secrets.GITHUB_TOKEN }} + delete-branch: true commit-message: "${{ env.PROJECT }}: ${{ env.RELEASE_TAG }}" title: "${{ env.PROJECT }}: ${{ env.RELEASE_TAG }}" body: "This is an automated PR to update the ${{ env.PROJECT }} formula"