Skip to content

Commit d8a7b59

Browse files
Automate draft PR for otel dependency updates (open-telemetry#2692)
1 parent 77dc4ad commit d8a7b59

File tree

2 files changed

+47
-95
lines changed

2 files changed

+47
-95
lines changed

.github/workflows/deps-test.yml

Lines changed: 0 additions & 95 deletions
This file was deleted.

.github/workflows/update-deps.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Update OpenTelemetry Dependencies
2+
on:
3+
pull_request:
4+
paths:
5+
- .github/workflows/update-deps.yml
6+
- internal/buildscripts/update-deps
7+
schedule:
8+
- cron: '0 12 * * 1-5'
9+
10+
env:
11+
OTEL_VERSION: latest
12+
GO_VERSION: 1.19.6
13+
14+
concurrency:
15+
group: update-deps-${{ github.event.pull_request.number || github.ref }}
16+
cancel-in-progress: true
17+
18+
jobs:
19+
# Update OpenTelemetry dependencies to latest and create a draft PR if successful and there are changes.
20+
update-deps:
21+
runs-on: ubuntu-20.04
22+
steps:
23+
- name: Checkout Repo
24+
uses: actions/checkout@v3
25+
- name: Setup Go
26+
uses: actions/setup-go@v3
27+
with:
28+
go-version: ${{ env.GO_VERSION }}
29+
- name: Caching dependency
30+
uses: actions/cache@v3
31+
with:
32+
path: |
33+
~/go/bin
34+
~/go/pkg/mod
35+
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
36+
- name: Update OpenTelemetry Dependencies to ${{ env.OTEL_VERSION }}
37+
run: OTEL_VERSION=${{ env.OTEL_VERSION }} ./internal/buildscripts/update-deps
38+
- name: make tidy
39+
run: make for-all CMD='make tidy'
40+
- name: Create Pull Request
41+
if: success() && (github.event_name == 'schedule')
42+
uses: peter-evans/create-pull-request@v4
43+
with:
44+
title: Update OpenTelemetry Dependencies to ${{ env.OTEL_VERSION }}
45+
commit-message: Update OpenTelemetry Dependencies to ${{ env.OTEL_VERSION }}
46+
base: main
47+
draft: true

0 commit comments

Comments
 (0)