Skip to content

Commit

Permalink
[chore] Setup a job to run make update otel
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitryax committed Jan 6, 2025
1 parent 333f016 commit f88f020
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 2 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/update-otel.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: 'Update contrib to the latest core source'
on:
workflow_dispatch:
pull_request: # TODO: remove before merging
schedule:
- cron: "27 21 * * *" # Run at an arbitrary time on weekdays.

# TODO: Skip if there is no new commits in the core source.
jobs:
update-otel:
runs-on: ubuntu-24.04
if: ${{ github.repository_owner == 'open-telemetry' }}
steps:
- uses: actions/checkout@v4
with:
path: opentelemetry-collector-contrib
- name: Pull the latest collector repo
uses: actions/checkout@v4
with:
path: opentelemetry-collector
repository: open-telemetry/opentelemetry-collector
- name: Update to latest opentelemetry-collector release
run: |
cd opentelemetry-collector-contrib
git config user.name opentelemetrybot
git config user.email [email protected]
make update-otel
- name: Create pull request against main
uses: peter-evans/create-pull-request@v7
with:
branch: opentelemetrybot/update-otel
token: ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }}
commit-message: Update to latest opentelemetry-collector release.
title: "[chore] Update to latest opentelemetry-collector"
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -417,8 +417,8 @@ update-otel:$(MULTIMOD)
$(MULTIMOD) sync -s=true -o ../opentelemetry-collector -m beta --commit-hash $(OTEL_VERSION)
git add . && git commit -s -m "[chore] multimod update beta modules" ; \
$(MAKE) gotidy
$(call updatehelper,$(CORE_VERSIONS),$(GOMOD),./cmd/otelcontribcol/builder-config.yaml)
$(call updatehelper,$(CORE_VERSIONS),$(GOMOD),./cmd/oteltestbedcol/builder-config.yaml)
$(call updatehelper,$(CORE_VERSIONS),$(GOMOD),$(SRC_ROOT)/cmd/otelcontribcol/builder-config.yaml)
$(call updatehelper,$(CORE_VERSIONS),$(GOMOD),$(SRC_ROOT)/cmd/oteltestbedcol/builder-config.yaml)
$(MAKE) genotelcontribcol
$(MAKE) genoteltestbedcol
$(MAKE) oteltestbedcol
Expand Down

0 comments on commit f88f020

Please sign in to comment.