mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2025-04-19 07:38:08 +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.name "github-actions[bot]"
|
||||||
git config --global user.email "github-actions[bot]@users.noreply.github.com"
|
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 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
|
# Push changes to the branch
|
||||||
git push origin update-app-headers --force
|
git push origin update-app-headers --force
|
||||||
@ -58,28 +55,18 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
PR_EXISTS=$(gh pr list --head "update-app-headers" --json number --jq '.[].number')
|
PR_EXISTS=$(gh pr list --head "update-app-headers" --json number --jq '.[].number')
|
||||||
if [ -z "$PR_EXISTS" ]; then
|
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." \
|
--body "This PR automatically updates the app-headers file." \
|
||||||
--head update-app-headers \
|
--head update-app-headers \
|
||||||
--base main
|
--base main
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Approve pull request
|
- name: Merge pull request (Squash and Merge)
|
||||||
if: steps.create-pr.outputs.pr_exists == 'true'
|
if: steps.create-pr.outputs.pr_exists == 'true'
|
||||||
env:
|
env:
|
||||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
PR_NUMBER=$(gh pr list --head "update-app-headers" --json number --jq '.[].number')
|
PR_NUMBER=$(gh pr list --head "update-app-headers" --json number --jq '.[].number')
|
||||||
if [ -n "$PR_NUMBER" ]; then
|
if [ -n "$PR_NUMBER" ]; then
|
||||||
gh pr review $PR_NUMBER --approve --body "Approved automatically by GitHub Action."
|
gh pr merge $PR_NUMBER --squash --auto --delete-branch
|
||||||
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
|
|
||||||
fi
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user