diff --git a/.github/workflows/generate-changelog.yml b/.github/workflows/generate-changelog.yml index 912e8d8258..8295747d53 100644 --- a/.github/workflows/generate-changelog.yml +++ b/.github/workflows/generate-changelog.yml @@ -11,7 +11,7 @@ jobs: steps: - uses: actions/checkout@v4 with: - ref: ${{ github.head_ref }} + ref: main token: ${{ secrets.CHANGELOG_GITHUB_TOKEN }} - name: Generate Changelog run: | @@ -21,13 +21,10 @@ jobs: -u ${{ github.repository_owner }} \ -p ${{ github.event.repository.name }} \ --token ${{ secrets.CHANGELOG_GITHUB_TOKEN }} - - name: Checkout to branch - run: | - git checkout "${GITHUB_REF#refs/heads/}" - name: Commit Changelog uses: stefanzweifel/git-auto-commit-action@v5 with: commit_message: "chore: update changelog" - branch: ${{ github.head_ref || github.ref_name }} + branch: main file_pattern: "CHANGELOG.md" commit_author: "GitHub Action "