From 6fc78dca575cac9bff64928da07c550726fc7b2a Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Fri, 10 Jan 2025 12:14:09 +0100 Subject: [PATCH] Update generate-app-headers.yaml --- .github/workflows/generate-app-headers.yaml | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) diff --git a/.github/workflows/generate-app-headers.yaml b/.github/workflows/generate-app-headers.yaml index 67f56990..78d3cb67 100644 --- a/.github/workflows/generate-app-headers.yaml +++ b/.github/workflows/generate-app-headers.yaml @@ -42,11 +42,8 @@ jobs: git config --global user.name "github-actions[bot]" git config --global user.email "github-actions[bot]@users.noreply.github.com" - # Make your changes, e.g., update app-headers file - echo "update app-headers to latest" >> misc/.app-headers - git add misc/.app-headers - git commit -m "update app-headers to latest" + git commit -m "[core]: update .app-headers to latest version" # Push changes to the branch git push origin update-app-headers --force @@ -58,28 +55,18 @@ jobs: run: | PR_EXISTS=$(gh pr list --head "update-app-headers" --json number --jq '.[].number') if [ -z "$PR_EXISTS" ]; then - gh pr create --title "Update app-headers to latest" \ + gh pr create --title "[core]: update .app-headers to latest version" \ --body "This PR automatically updates the app-headers file." \ --head update-app-headers \ --base main fi - - name: Approve pull request + - name: Merge pull request (Squash and Merge) if: steps.create-pr.outputs.pr_exists == 'true' env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | PR_NUMBER=$(gh pr list --head "update-app-headers" --json number --jq '.[].number') if [ -n "$PR_NUMBER" ]; then - gh pr review $PR_NUMBER --approve --body "Approved automatically by GitHub Action." - fi - - - name: Merge pull request - if: steps.create-pr.outputs.pr_exists == 'true' - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - PR_NUMBER=$(gh pr list --head "update-app-headers" --json number --jq '.[].number') - if [ -n "$PR_NUMBER" ]; then - gh pr merge $PR_NUMBER --merge --auto --delete-branch + gh pr merge $PR_NUMBER --squash --auto --delete-branch fi