mirror of
https://github.com/peass-ng/PEASS-ng.git
synced 2026-06-12 19:11:39 -07:00
ci: require release-triggering token for windows auto-merge
This commit is contained in:
@@ -88,10 +88,15 @@ jobs:
|
||||
- name: Merge trusted bot PR
|
||||
if: ${{ steps.bot_pr.outputs.should_merge == 'true' }}
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.CHACK_AGENT_FIXER_TOKEN || github.token }}
|
||||
GH_TOKEN: ${{ secrets.CHACK_AGENT_FIXER_TOKEN }}
|
||||
PR_NUMBER: ${{ steps.bot_pr.outputs.pr_number }}
|
||||
COMMIT_TITLE: ${{ steps.bot_pr.outputs.title }}
|
||||
run: |
|
||||
if [ -z "$GH_TOKEN" ]; then
|
||||
echo "CHACK_AGENT_FIXER_TOKEN is required to merge this PR because github.token merges do not trigger the release workflow."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
for attempt in {1..6}; do
|
||||
if gh api \
|
||||
-X PUT \
|
||||
|
||||
@@ -39,7 +39,7 @@ jobs:
|
||||
- name: Create validated update pull request
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
MERGE_TOKEN: ${{ secrets.CHACK_AGENT_FIXER_TOKEN || github.token }}
|
||||
MERGE_TOKEN: ${{ secrets.CHACK_AGENT_FIXER_TOKEN }}
|
||||
run: |
|
||||
title="chore(winpeas): update windows version vulnerability definitions"
|
||||
branch="bot/update-windows-version-definitions"
|
||||
@@ -75,6 +75,11 @@ jobs:
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "$MERGE_TOKEN" ]; then
|
||||
echo "CHACK_AGENT_FIXER_TOKEN is required to merge this PR because github.token merges do not trigger the release workflow."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
gh workflow run PR-tests.yml --ref "$branch"
|
||||
|
||||
if GH_TOKEN="$MERGE_TOKEN" gh pr merge "$pr_number" --squash --auto --subject "$title"; then
|
||||
|
||||
Reference in New Issue
Block a user