Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[chore] add a job to update-otel daily #36777

Closed
wants to merge 9 commits into from
32 changes: 32 additions & 0 deletions .github/workflows/update-otel-cron.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: 'Update contrib to the latest core source'
on:
schedule:
atoulme marked this conversation as resolved.
Show resolved Hide resolved
- cron: "27 21 * * *" # Run at an arbitrary time on weekdays.
atoulme marked this conversation as resolved.
Show resolved Hide resolved

jobs:
update-otel:
runs-on: ubuntu-24.04
if: ${{ github.repository_owner == 'open-telemetry' }}
atoulme marked this conversation as resolved.
Show resolved Hide resolved
steps:
- uses: actions/checkout@v4
- name: Update to latest opentelemetry-collector release
run: make update-otel
- name: Create pull request against main
env:
# not using secrets.GITHUB_TOKEN since pull requests from that token do not run workflows
GH_TOKEN: ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }}
run: |
message="[chore] Update to latest opentelemetry-collector"
body="Update to latest opentelemetry-collector release."
branch="opentelemetrybot/update-otel"

git checkout -b $branch
git commit -a -m "$message"
git push --set-upstream origin $branch
url=$(gh pr create --title "$message" \
--body "$body" \
--base main)

pull_request_number=${url//*\//}
git push
atoulme marked this conversation as resolved.
Show resolved Hide resolved

Loading