Update generate-app-headers.yaml

This commit is contained in:
CanbiZ 2025-01-10 13:03:26 +01:00 committed by GitHub
parent a1422379bd
commit 24722c7eb8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -19,7 +19,7 @@ jobs:
with:
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
run: |
git fetch origin
@ -31,7 +31,7 @@ jobs:
git checkout update-app-headers
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
run: |
if [ ! -f ".app-headers" ]; then
@ -41,7 +41,7 @@ jobs:
echo ".app-headers already exists."
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
run: |
git fetch origin
@ -56,6 +56,8 @@ jobs:
# Step 5: Create Pull Request if changes detected
- name: Create Pull Request if changes detected
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
PR_EXISTS=$(gh pr list --head "update-app-headers" --json number --jq '.[].number')
if [ -z "$PR_EXISTS" ]; then
@ -72,4 +74,3 @@ jobs:
- name: Output final status
run: |
echo "Workflow completed successfully. Branch and PR status updated."