1
0
mirror of https://github.com/community-scripts/ProxmoxVE.git synced 2025-03-08 13:19:05 +00:00

Update generate-app-headers.yaml

This commit is contained in:
CanbiZ 2025-01-10 14:30:04 +01:00 committed by GitHub
parent d227277311
commit 51cbfbdc4f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -22,7 +22,13 @@ 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: Merge main into update-app-headers branch # Step 2: Configure git user
- name: Configure Git user
run: |
git config --global user.name "GitHub Actions"
git config --global user.email "actions@github.com"
# Step 3: Merge main into update-app-headers
- name: Merge main into update-app-headers - name: Merge main into update-app-headers
run: | run: |
git fetch origin git fetch origin
@ -30,7 +36,7 @@ jobs:
git merge origin/main --no-ff --no-edit git merge origin/main --no-ff --no-edit
git push origin update-app-headers --force git push origin update-app-headers --force
# Step 3: Ensure .app-headers file exists and initialize it # Step 4: Ensure .app-headers file exists and initialize it
- name: Initialize .app-headers file - name: Initialize .app-headers file
run: | run: |
if [ ! -f "ct/.app-headers" ]; then if [ ! -f "ct/.app-headers" ]; then
@ -38,7 +44,7 @@ jobs:
touch ct/.app-headers touch ct/.app-headers
fi fi
# Step 4: Loop through ct/ scripts and execute figlet if APP= is found # Step 5: Loop through ct/ scripts and execute figlet if APP= is found
- name: Update .app-headers with figlet output - name: Update .app-headers with figlet output
run: | run: |
echo "Updating .app-headers with figlet output." echo "Updating .app-headers with figlet output."
@ -50,13 +56,13 @@ jobs:
fi fi
done done
# Step 5: Commit the changes to .app-headers # Step 6: Commit the changes to .app-headers
- name: Commit updated .app-headers - name: Commit updated .app-headers
run: | run: |
git diff --quiet -- ct/.app-headers || git commit -am "[core]: update .app-headers to latest version" git diff --quiet -- ct/.app-headers || git commit -am "[core]: update .app-headers to latest version"
git push origin update-app-headers --force git push origin update-app-headers --force
# Step 6: Create Pull Request to merge changes into main # Step 7: Create Pull Request to merge changes into main
- name: Create Pull Request if changes detected - name: Create Pull Request if changes detected
env: env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@ -73,7 +79,7 @@ jobs:
echo "PR already exists." echo "PR already exists."
fi fi
# Step 7: Automatically merge PR # Step 8: Automatically merge PR
- name: Automatically merge PR - name: Automatically merge PR
env: env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@ -87,7 +93,7 @@ jobs:
echo "No PR found to merge." echo "No PR found to merge."
fi fi
# Step 8: Final status output # Step 9: Final status output
- 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."