forked from open-telemetry/opentelemetry-demo
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdependabot-auto-update-protobuf-diff.yml
More file actions
37 lines (34 loc) · 1.06 KB
/
Copy pathdependabot-auto-update-protobuf-diff.yml
File metadata and controls
37 lines (34 loc) · 1.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# 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:
actions: write
pull-requests: write
contents: write
packages: 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@v4
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