summaryrefslogtreecommitdiff
path: root/.github/workflows/dependabot-auto-update-protobuf-diff.yml
diff options
context:
space:
mode:
authorSaumit <justsaumit@protonmail.com>2025-09-27 02:14:26 +0530
committerSaumit <justsaumit@protonmail.com>2025-09-27 02:14:26 +0530
commit82e03978b89938219958032efb1448cc76baa181 (patch)
tree626f3e54d52ecd49be0ed3bee30abacc0453d081 /.github/workflows/dependabot-auto-update-protobuf-diff.yml
Initial snapshot - OpenTelemetry demo 2.1.3 -f
Diffstat (limited to '.github/workflows/dependabot-auto-update-protobuf-diff.yml')
-rw-r--r--.github/workflows/dependabot-auto-update-protobuf-diff.yml35
1 files changed, 35 insertions, 0 deletions
diff --git a/.github/workflows/dependabot-auto-update-protobuf-diff.yml b/.github/workflows/dependabot-auto-update-protobuf-diff.yml
new file mode 100644
index 0000000..96dd1bd
--- /dev/null
+++ b/.github/workflows/dependabot-auto-update-protobuf-diff.yml
@@ -0,0 +1,35 @@
+# Copyright The OpenTelemetry Authors
+# SPDX-License-Identifier: Apache-2.0
+
+on:
+ pull_request:
+ branches: [ main ]
+
+permissions:
+ contents: read
+
+jobs:
+ dependabot-auto-update-protobuf-diff:
+ permissions:
+ contents: write
+ pull-requests: write
+ runs-on: ubuntu-latest
+ # Only run this job if the PR is opened by dependabot and the last commit is from dependabot
+ if: github.event.pull_request.user.login == 'dependabot[bot]'
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v5
+ with:
+ ref: ${{ github.head_ref }}
+ token: ${{ secrets.DEPENDABOT_TOKEN }}
+ - name: Generate
+ run: make clean docker-generate-protobuf
+ - name: Commit only if there are changes
+ run: |
+ if ! git diff --quiet; then
+ git config user.name "dependabot[bot]"
+ git config user.email "49699333+dependabot[bot]@users.noreply.github.com"
+ git add .
+ git commit -s -m "chore: update protobuf"
+ git push
+ fi