mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2025-04-19 03:58:07 +00:00
Update generate-app-headers.yaml
This commit is contained in:
parent
a1422379bd
commit
24722c7eb8
9
.github/workflows/generate-app-headers.yaml
vendored
9
.github/workflows/generate-app-headers.yaml
vendored
@ -19,7 +19,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
fetch-depth: 0 # Ensure we have full access to all branches
|
fetch-depth: 0 # Ensure we have full access to all branches
|
||||||
|
|
||||||
# Step 2: Check if update-app-headers branch exists, create if not
|
# Step 2: Check or Create update-app-headers branch
|
||||||
- name: Check or Create update-app-headers branch
|
- name: Check or Create update-app-headers branch
|
||||||
run: |
|
run: |
|
||||||
git fetch origin
|
git fetch origin
|
||||||
@ -31,7 +31,7 @@ jobs:
|
|||||||
git checkout update-app-headers
|
git checkout update-app-headers
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Step 3: Ensure .app-headers file exists (if missing, create it)
|
# Step 3: Ensure .app-headers file exists
|
||||||
- name: Ensure .app-headers file exists
|
- name: Ensure .app-headers file exists
|
||||||
run: |
|
run: |
|
||||||
if [ ! -f ".app-headers" ]; then
|
if [ ! -f ".app-headers" ]; then
|
||||||
@ -41,7 +41,7 @@ jobs:
|
|||||||
echo ".app-headers already exists."
|
echo ".app-headers already exists."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Step 4: Compare .app-headers with main, commit if changes
|
# Step 4: Compare with main and commit changes
|
||||||
- name: Compare with main and commit changes
|
- name: Compare with main and commit changes
|
||||||
run: |
|
run: |
|
||||||
git fetch origin
|
git fetch origin
|
||||||
@ -56,6 +56,8 @@ jobs:
|
|||||||
|
|
||||||
# Step 5: Create Pull Request if changes detected
|
# Step 5: Create Pull Request if changes detected
|
||||||
- name: Create Pull Request if changes detected
|
- name: Create Pull Request if changes detected
|
||||||
|
env:
|
||||||
|
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" --json number --jq '.[].number')
|
||||||
if [ -z "$PR_EXISTS" ]; then
|
if [ -z "$PR_EXISTS" ]; then
|
||||||
@ -72,4 +74,3 @@ jobs:
|
|||||||
- name: Output final status
|
- name: Output final status
|
||||||
run: |
|
run: |
|
||||||
echo "Workflow completed successfully. Branch and PR status updated."
|
echo "Workflow completed successfully. Branch and PR status updated."
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user