From 896dee5cc8a54843e56a257ed907e60339e9f0fc Mon Sep 17 00:00:00 2001 From: James Thompson Date: Tue, 30 Jun 2026 14:21:09 +1000 Subject: [PATCH 1/5] Add a workflow to update go mod --- .github/renovate.json5 | 7 +++++ .github/workflows/renovate-go.yml | 52 +++++++++++++++++++++++++++++++ 2 files changed, 59 insertions(+) create mode 100644 .github/workflows/renovate-go.yml diff --git a/.github/renovate.json5 b/.github/renovate.json5 index 53ecd37444..12ebd8541c 100644 --- a/.github/renovate.json5 +++ b/.github/renovate.json5 @@ -5,6 +5,13 @@ 'helpers:pinGitHubActionDigestsToSemver', ':separateMultipleMajorReleases', ], + gitIgnoredAuthors: [ + "107717825+opentelemetrybot@users.noreply.github.com", + "107717825+opentelemetrybot[bot]@users.noreply.github.com", + "197425009+otelbot@users.noreply.github.com", + "197425009+otelbot[bot]@users.noreply.github.com", + "github-actions[bot]@users.noreply.github.com" + ], prHourlyLimit: 15, prConcurrentLimit: 15, ignorePaths: [ diff --git a/.github/workflows/renovate-go.yml b/.github/workflows/renovate-go.yml new file mode 100644 index 0000000000..b6a503083e --- /dev/null +++ b/.github/workflows/renovate-go.yml @@ -0,0 +1,52 @@ +name: Renovate Go Post-Update + +on: + pull_request: + types: [opened, synchronize, edited] + paths: + - '**/go.mod' + branches: + - main + +permissions: + contents: write + pull-requests: write + +jobs: + gomodtidy: + # Only run on Renovate PRs + if: startsWith(github.head_ref, 'renovate/') + runs-on: ubuntu-24.04 + steps: + - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 + with: + ref: ${{ github.head_ref }} + token: ${{ secrets.GITHUB_TOKEN }} + - uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6.5.0 + with: + go-version-file: collector/go.mod + - run: find . -name "go.mod" -execdir go mod tidy \; + - name: Check if go mod changed + id: check_changes + env: + BASE_REF: ${{ github.base_ref }} + run: | + git fetch origin "$BASE_REF" + if git diff --name-only "origin/$BASE_REF" HEAD \ + | grep -E '^(.*/)?go\.(mod|sum)$' >/dev/null; then + echo "changed=true" >> $GITHUB_OUTPUT + else + echo "changed=false" >> $GITHUB_OUTPUT + fi + - name: Commit and push changes + if: steps.check_changes.outputs.changed == 'true' + run: | + git config user.name "github-actions[bot]" + git config user.email "github-actions[bot]@users.noreply.github.com" + git add semantic_conventions/ + if git diff --staged --quiet; then + echo "No changes to commit" + else + git commit -m "chore: go mod tidy" + git push + fi \ No newline at end of file From 0a9752d448091fb47bd2221dfd8dbc74415f90ff Mon Sep 17 00:00:00 2001 From: James Thompson Date: Tue, 30 Jun 2026 14:32:46 +1000 Subject: [PATCH 2/5] Fix --- .github/workflows/renovate-go.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/renovate-go.yml b/.github/workflows/renovate-go.yml index b6a503083e..90fd340012 100644 --- a/.github/workflows/renovate-go.yml +++ b/.github/workflows/renovate-go.yml @@ -43,7 +43,7 @@ jobs: run: | git config user.name "github-actions[bot]" git config user.email "github-actions[bot]@users.noreply.github.com" - git add semantic_conventions/ + git add collector/ if git diff --staged --quiet; then echo "No changes to commit" else From 1288e1c3c84c7220b5b53be762771a9db7e9a731 Mon Sep 17 00:00:00 2001 From: James Thompson Date: Tue, 30 Jun 2026 14:37:26 +1000 Subject: [PATCH 3/5] Rename workflow --- .github/workflows/renovate-go.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/renovate-go.yml b/.github/workflows/renovate-go.yml index 90fd340012..504626badb 100644 --- a/.github/workflows/renovate-go.yml +++ b/.github/workflows/renovate-go.yml @@ -1,4 +1,4 @@ -name: Renovate Go Post-Update +name: Renovate Post-Update Tasks on: pull_request: From 80f0efb7d750c8736f0ffb873140c2bf8dea808b Mon Sep 17 00:00:00 2001 From: James Thompson Date: Tue, 30 Jun 2026 17:06:02 +1000 Subject: [PATCH 4/5] Update renovate-go.yml --- .github/workflows/renovate-go.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/renovate-go.yml b/.github/workflows/renovate-go.yml index 504626badb..5e2850f6d8 100644 --- a/.github/workflows/renovate-go.yml +++ b/.github/workflows/renovate-go.yml @@ -49,4 +49,4 @@ jobs: else git commit -m "chore: go mod tidy" git push - fi \ No newline at end of file + fi From 041442ac7ad2eb792cdffdf1663bdd3fb1e635f3 Mon Sep 17 00:00:00 2001 From: James Thompson Date: Tue, 30 Jun 2026 18:05:51 +1000 Subject: [PATCH 5/5] Update renovate-go.yml --- .github/workflows/renovate-go.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/renovate-go.yml b/.github/workflows/renovate-go.yml index 5e2850f6d8..59547711c5 100644 --- a/.github/workflows/renovate-go.yml +++ b/.github/workflows/renovate-go.yml @@ -1,4 +1,4 @@ -name: Renovate Post-Update Tasks +name: Renovate Post-Update Tasks / Go on: pull_request: