mirror of
https://github.com/community-scripts/ProxmoxVE
synced 2025-02-26 09:50:06 +00:00
Update auto-update-app-headers.yml
This commit is contained in:
parent
c032db98a3
commit
481138bff5
13
.github/workflows/auto-update-app-headers.yml
vendored
13
.github/workflows/auto-update-app-headers.yml
vendored
@ -58,7 +58,7 @@ jobs:
|
||||
git push origin pr-update-app-headers --force
|
||||
|
||||
# Create PR against main
|
||||
gh pr create --title "[Github Action] Update .app-headers file" \
|
||||
gh pr create --title "[core] update .app-headers file" \
|
||||
--body "This PR is auto-generated by a Github Action to update the .app-headers file." \
|
||||
--head pr-update-app-headers \
|
||||
--base main \
|
||||
@ -66,12 +66,17 @@ jobs:
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Approve pull request
|
||||
- name: Re-approve pull request after update
|
||||
if: steps.verify-diff.outputs.changed == 'true'
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
PR_NUMBER=$(gh pr list --head "pr-update-app-headers" --json number --jq '.[].number')
|
||||
if [ -n "$PR_NUMBER" ]; then
|
||||
gh pr review $PR_NUMBER --approve
|
||||
# Check if the PR was created by the bot (skip review if so)
|
||||
PR_AUTHOR=$(gh pr view "$PR_NUMBER" --json author --jq '.author.login')
|
||||
if [ "$PR_AUTHOR" != "github-actions[bot]" ]; then
|
||||
gh pr review "$PR_NUMBER" --approve
|
||||
else
|
||||
echo "PR was created by the bot, skipping review."
|
||||
fi
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user