diff --git a/.github/workflows/tidy.yml b/.github/workflows/tidy.yml index ffba3f7b51b8..62c6ecb80ad3 100644 --- a/.github/workflows/tidy.yml +++ b/.github/workflows/tidy.yml @@ -13,7 +13,7 @@ jobs: steps: - uses: actions/checkout@v3 with: - branch: ${{ github.head_ref }} + ref: ${{ github.head_ref }} - uses: actions/setup-go@v4 with: go-version: 1.19 @@ -34,10 +34,7 @@ jobs: - name: go mod tidy run: | make gotidy - git config user.name opentelemetrybot - git config user.email 107717825+opentelemetrybot@users.noreply.github.com - git checkout ${{ github.head_ref }} - echo "git diff --exit-code || (git add . && git commit -m \"go mod tidy\" && git push origin ${{ github.head_ref }})" - git diff --exit-code || (git add . && git commit -m "go mod tidy" && git push origin ${{ github.head_ref }}) - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + git config user.name github-actions + git config user.email github-actions@github.com + echo "git diff --exit-code || (git add . && git commit -m \"go mod tidy\" && git push)" + git diff --exit-code || (git add . && git commit -m "go mod tidy" && git push)