Skip to content

Commit 6ec64b4

Browse files
committed
Auto approve PR only when set to true in repo env variables
1 parent 1220f5f commit 6ec64b4

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

.github/workflows/Verify.Redist.Update.yaml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ jobs:
1616
verify:
1717
name: "Verify Redist Update"
1818
runs-on: ubuntu-latest
19+
env:
20+
ALLOW_AUTO_APPROVE_REDIST_PR: ${{ vars.ALLOW_AUTO_APPROVE_REDIST_PR }}
1921
permissions:
2022
pull-requests: write
2123
contents: read
@@ -49,8 +51,8 @@ jobs:
4951
exit 1
5052
fi
5153
52-
#- name: Auto-approve PR
53-
# if: success() && github.actor == 'github-actions[bot]'
54-
# uses: hmarr/auto-approve-action@v4
55-
# with:
56-
# github-token: ${{ secrets.GITHUB_TOKEN }}
54+
- name: Auto-approve PR
55+
if: success() && env.ALLOW_AUTO_APPROVE_REDIST_PR == 'true' && github.actor == 'sunnamed434'
56+
uses: hmarr/auto-approve-action@v4
57+
with:
58+
github-token: ${{ secrets.PAT }}

0 commit comments

Comments
 (0)