ProxmoxVE/.github/workflows/auto-update-app-headers.yml

55 lines
1.7 KiB
YAML
Raw Normal View History

name: Auto Update .app-headers with Hard Merge from Main
on:
push:
branches:
- main
paths:
- 'ct/**.sh'
2025-01-14 13:58:23 +00:00
workflow_dispatch:
jobs:
2025-01-14 13:48:47 +00:00
update-app-headers:
runs-on: ubuntu-latest
2025-01-14 13:48:47 +00:00
steps:
2025-01-14 13:48:47 +00:00
# Step 1: Checkout the repository
- name: Checkout repository
uses: actions/checkout@v2
2025-01-14 13:48:47 +00:00
# Step 2: Set up Git user for committing changes
- name: Set up Git
run: |
git config --global user.name "GitHub Actions"
git config --global user.email "actions@github.com"
2025-01-14 13:58:23 +00:00
# Step 3: Install figlet
2025-01-14 13:51:19 +00:00
- name: Install figlet
run: sudo apt-get install -y figlet
2025-01-14 13:48:47 +00:00
# Step 4: Run the generate-app-headers.sh script to update .app-headers
- name: Run generate-app-headers.sh to update .app-headers
run: |
2025-01-14 13:48:47 +00:00
chmod +x .github/workflows/generate-app-headers.sh
.github/workflows/generate-app-headers.sh
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2025-01-14 13:58:23 +00:00
# Step 5: Commit the changes directly to main (no temporary branch)
- name: Commit changes directly to main
run: |
2025-01-14 13:48:47 +00:00
git add ./misc/.app-headers
git commit -m "Update .app-headers file"
2025-01-14 13:58:23 +00:00
git push origin main
# Step 6: Create Pull Request (PR) to main
- name: Create Pull Request to main
uses: peter-evans/create-pull-request@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
base: main
head: main # Direkt gegen den main Branch
title: "Update .app-headers file"
body: "Automated PR to update .app-headers file based on script changes."
draft: false # Setze auf true, wenn der PR als Draft erstellt werden soll