diff --git a/.github/workflows/update-version.yml b/.github/workflows/update-version.yml index f4854c2c..8dd67670 100644 --- a/.github/workflows/update-version.yml +++ b/.github/workflows/update-version.yml @@ -37,7 +37,7 @@ jobs: - name: Checkout the code uses: actions/checkout@v3 with: - repository: ${{ github.repository }} + repository: runtime ref: ${{ inputs.branch }} fetch-depth: 0 token: ${{ secrets.RELEASE_TOKEN }} @@ -55,12 +55,12 @@ jobs: run: | git config --local user.email "raymondmeester@gmail.com" git config --local user.name "skin27" - git commit -a -m "Update version to ${{inputs.milestone}}" + git diff-index --quiet HEAD || git commit -a -m "Update version to ${{inputs.milestone}}" - name: Push changes uses: ad-m/github-push-action@master with: github_token: ${{ secrets.RELEASE_TOKEN }} - repository: ${{ github.repository }} - ref: ${{ github.ref_name }} + repository: runtime + ref: ${{ inputs.branch }} force_with_lease: true