mirror of
https://github.com/community-scripts/ProxmoxVE
synced 2025-02-13 03:09:17 +00:00
Update generate-app-headers.yaml
This commit is contained in:
parent
f7d9fe7c3a
commit
0c44d2d23c
6
.github/workflows/generate-app-headers.yaml
vendored
6
.github/workflows/generate-app-headers.yaml
vendored
@ -52,13 +52,13 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
PR_EXISTS=$(gh pr list --head "update-app-headers" --json number --jq '.[].number')
|
PR_EXISTS=$(gh pr list --head "update-app-headers" | grep -o '[0-9]\+')
|
||||||
if [ -z "$PR_EXISTS" ]; then
|
if [ -z "$PR_EXISTS" ]; then
|
||||||
echo "Creating a new PR."
|
echo "Creating a new PR."
|
||||||
PR_URL=$(gh pr create --title "[core]: update .app-headers to latest version" \
|
PR_URL=$(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 --json url -q .url)
|
--base main -q .url)
|
||||||
echo "PR created: $PR_URL"
|
echo "PR created: $PR_URL"
|
||||||
else
|
else
|
||||||
echo "PR already exists."
|
echo "PR already exists."
|
||||||
@ -70,7 +70,7 @@ jobs:
|
|||||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
echo "Attempting to merge PR."
|
echo "Attempting to merge PR."
|
||||||
PR_NUMBER=$(gh pr list --head "update-app-headers" --json number --jq '.[].number')
|
PR_NUMBER=$(gh pr list --head "update-app-headers" | grep -o '[0-9]\+')
|
||||||
if [ -n "$PR_NUMBER" ]; then
|
if [ -n "$PR_NUMBER" ]; then
|
||||||
gh pr merge "$PR_NUMBER" --merge --admin --delete-branch
|
gh pr merge "$PR_NUMBER" --merge --admin --delete-branch
|
||||||
echo "PR merged successfully."
|
echo "PR merged successfully."
|
||||||
|
Loading…
Reference in New Issue
Block a user