Auto Update .app-files #5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Auto Update .app-headers with Hard Merge from Main | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - 'ct/**.sh' | |
| workflow_dispatch: | |
| jobs: | |
| update-app-headers: | |
| runs-on: ubuntu-latest | |
| steps: | |
| # Step 1: Checkout the repository | |
| - name: Checkout repository | |
| uses: actions/checkout@v2 | |
| # 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 "[email protected]" | |
| # Step 3: Install figlet | |
| - name: Install figlet | |
| run: sudo apt-get install -y figlet | |
| # Step 4: Run the generate-app-headers.sh script to update .app-headers | |
| - name: Run generate-app-headers.sh to update .app-headers | |
| run: | | |
| chmod +x .github/workflows/generate-app-headers.sh | |
| .github/workflows/generate-app-headers.sh | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| # Step 5: Commit the changes directly to main (no temporary branch) | |
| - name: Commit changes directly to main | |
| run: | | |
| git add ./misc/.app-headers | |
| git commit -m "Update .app-headers file" | |
| 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 |