diff --git a/.github/workflows/autoupdate.yaml b/.github/workflows/autoupdate.yaml index e598afa..a0607cc 100644 --- a/.github/workflows/autoupdate.yaml +++ b/.github/workflows/autoupdate.yaml @@ -34,15 +34,16 @@ jobs: # This job is responsible for running tests and linting the codebase test: name: "Unit testing" - # needs: [prepare] runs-on: ubuntu-latest container: golang:1 - # container: github/super-linter:v4 needs: [prepare] steps: - name: Checkout repository uses: actions/checkout@v4 + with: + fetch-depth: 0 # Ensure full history is checked out + token: ${{ secrets.GITHUB_TOKEN }} # Ensure token is available for pushing changes - name: Install Go uses: actions/setup-go@v5 @@ -69,5 +70,5 @@ jobs: git config --global user.email "github-actions[bot]@users.noreply.github.com" git config --global user.name "github-actions[bot]" git add go.mod go.sum - git commit -m "Update go.mod and go.sum" + git diff-index --quiet HEAD || git commit -m "Update go.mod and go.sum" git push