Skip to content

fix(deps): update dependency io.opentelemetry.instrumentation:opentel… #3

fix(deps): update dependency io.opentelemetry.instrumentation:opentel…

fix(deps): update dependency io.opentelemetry.instrumentation:opentel… #3

---
name: Regenerate API Diff (OTel update)
on:
push:
branches:
- "renovate/otel.instrumentation.version"
permissions: {}
jobs:
generate:
runs-on: ubuntu-24.04
permissions:
contents: read # checkout + read-only `git fetch origin main` for the verify step
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
ref: ${{ github.ref }}
persist-credentials: false
- uses: jdx/mise-action@dad1bfd3df957f44999b559dd69dc1671cb4e9ea # v4.2.1
with:
version: v2026.7.5
sha256: 5f7ab76afdf0780d12edeaa67e908094e9ccf7924cfe203e415c1cfb87bbf778
- name: Cache local Maven repository
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Verify OTel instrumentation version was updated
run: |
git fetch origin main
DIFF_POM=$(git diff origin/main -- pom.xml)
if ! echo "$DIFF_POM" | grep -q 'otel.instrumentation.version'; then
echo "::error::otel.instrumentation.version not updated in pom.xml"
exit 1
fi
- name: Regenerate API diff
run: mise run api-diff
- name: Validate and export apidiff changes as a patch
run: |
UNEXPECTED=$(git diff --name-only | grep -v '^docs/apidiffs/' || true)
if [[ -n "$UNEXPECTED" ]]; then
echo "::error::Unexpected files changed:"
echo "$UNEXPECTED"
exit 1
fi
git diff --binary -- docs/apidiffs > /tmp/apidiffs.patch
- name: Upload generated patch
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: apidiffs-patch
path: /tmp/apidiffs.patch
retention-days: 5
publish:
runs-on: ubuntu-24.04
needs: generate
permissions:
contents: write # push regenerated apidiffs back to the renovate branch
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
ref: ${{ github.ref }}
# zizmor: ignore[artipacked] -- needs credentials to push
persist-credentials: true
- name: Download generated patch
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: apidiffs-patch
path: /tmp/patch
- name: Commit and push regenerated apidiffs
run: |
PATCH=/tmp/patch/apidiffs.patch
if [[ ! -s "$PATCH" ]]; then
echo "No apidiff changes to commit"
exit 0
fi
git apply "$PATCH"
# Note: GITHUB_TOKEN pushes don't trigger CI re-runs.
# Close and reopen the PR to trigger CI after this commit.
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add docs/apidiffs
git commit -m "chore: regenerate api diff"
git push