mirror of
https://github.com/community-scripts/ProxmoxVE
synced 2025-01-10 19:05:09 +00:00
Update generate-app-headers.yaml
This commit is contained in:
parent
7dc54da8a3
commit
6fc78dca57
21
.github/workflows/generate-app-headers.yaml
vendored
21
.github/workflows/generate-app-headers.yaml
vendored
@ -42,11 +42,8 @@ jobs:
|
||||
git config --global user.name "github-actions[bot]"
|
||||
git config --global user.email "github-actions[bot]@users.noreply.github.com"
|
||||
|
||||
# Make your changes, e.g., update app-headers file
|
||||
echo "update app-headers to latest" >> misc/.app-headers
|
||||
|
||||
git add misc/.app-headers
|
||||
git commit -m "update app-headers to latest"
|
||||
git commit -m "[core]: update .app-headers to latest version"
|
||||
|
||||
# Push changes to the branch
|
||||
git push origin update-app-headers --force
|
||||
@ -58,28 +55,18 @@ jobs:
|
||||
run: |
|
||||
PR_EXISTS=$(gh pr list --head "update-app-headers" --json number --jq '.[].number')
|
||||
if [ -z "$PR_EXISTS" ]; then
|
||||
gh pr create --title "Update app-headers to latest" \
|
||||
gh pr create --title "[core]: update .app-headers to latest version" \
|
||||
--body "This PR automatically updates the app-headers file." \
|
||||
--head update-app-headers \
|
||||
--base main
|
||||
fi
|
||||
|
||||
- name: Approve pull request
|
||||
- name: Merge pull request (Squash and Merge)
|
||||
if: steps.create-pr.outputs.pr_exists == 'true'
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
PR_NUMBER=$(gh pr list --head "update-app-headers" --json number --jq '.[].number')
|
||||
if [ -n "$PR_NUMBER" ]; then
|
||||
gh pr review $PR_NUMBER --approve --body "Approved automatically by GitHub Action."
|
||||
fi
|
||||
|
||||
- name: Merge pull request
|
||||
if: steps.create-pr.outputs.pr_exists == 'true'
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
PR_NUMBER=$(gh pr list --head "update-app-headers" --json number --jq '.[].number')
|
||||
if [ -n "$PR_NUMBER" ]; then
|
||||
gh pr merge $PR_NUMBER --merge --auto --delete-branch
|
||||
gh pr merge $PR_NUMBER --squash --auto --delete-branch
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user