-
Notifications
You must be signed in to change notification settings - Fork 534
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: add workflow to update otel dependencies (#2536)
- Loading branch information
1 parent
e674b1b
commit fa78668
Showing
1 changed file
with
48 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: Create or Update OpenTelemetry Update PR | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
create-or-update-deps-pr: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Fork | ||
run: gh repo fork open-telemetry/opentelemetry-js-contrib | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }} | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: opentelemetrybot/opentelemetry-js-contrib | ||
ref: main | ||
token: ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }} | ||
- name: Sync with upstream | ||
run: | | ||
git remote show origin | ||
git remote add upstream https://github.com/open-telemetry/opentelemetry-js-contrib.git | ||
git fetch upstream | ||
git reset --hard upstream/main | ||
git push origin main --force | ||
- uses: actions/setup-node@v4 | ||
with: | ||
cache: 'npm' | ||
cache-dependency-path: package-lock.json | ||
node-version: 22 | ||
|
||
- run: npm install -g npm@latest | ||
|
||
- run: npm ci | ||
|
||
- name: Create/Update Release PR | ||
run: | | ||
git config user.name opentelemetrybot | ||
git config user.email [email protected] | ||
git checkout -b feat/update-otel-deps | ||
node ./scripts/update-otel-deps.js | ||
git commit -am "feat(deps): update deps matching '@opentelemetry/*'" | ||
git push origin feat/update-otel-deps --force | ||
gh pr create --repo open-telemetry/opentelemetry-js-contrib --title 'chore: prepare next release' --body 'Updates all `@opentelemetry/*` dependencies to latest' | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }} |