diff --git a/.github/workflows/update-release-version-in-readme.yml b/.github/workflows/update-release-version-in-readme.yml index 4b7daf72a..8ff30d489 100644 --- a/.github/workflows/update-release-version-in-readme.yml +++ b/.github/workflows/update-release-version-in-readme.yml @@ -10,7 +10,9 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v4 - + with: + fetch-depth: 0 # Fetch all history so we can push back to the branch + - name: Get latest release version run: echo "LATEST_VERSION=${{ github.event.release.tag_name }}" >> $GITHUB_ENV @@ -24,4 +26,4 @@ jobs: git config --global user.name "github-actions[bot]" git add README.md git commit -m "Update latest release version to $LATEST_VERSION" - git push + git push origin HEAD:main # Ensure we're pushing to the main branch