Skip to content

Commit

Permalink
Create PR in operator repo on javaagent release. (#5710)
Browse files Browse the repository at this point in the history
* File issue in operator repo on javaagent release.

* Open PR instead of issue

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
  • Loading branch information
anuraaga and trask committed Apr 1, 2022
1 parent 6c7336b commit da1dc66
Showing 1 changed file with 45 additions and 1 deletion.
46 changes: 45 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -150,10 +150,54 @@ jobs:
v$VERSION \
opentelemetry-javaagent.jar
- uses: actions/checkout@v3
with:
repository: opentelemetry-java-bot/opentelemetry-operator
# this is the PAT used for "git push" below
token: ${{ secrets.OPENTELEMETRY_JAVA_BOT_TOKEN }}

- name: Initialize pull request branch
env:
VERSION: ${{ steps.set-versions.outputs.release-version }}
run: |
git remote add upstream https://github.com/open-telemetry/opentelemetry-operator.git
git fetch upstream
git checkout -b update-opentelemetry-javaagent-to-$VERSION upstream/main
- name: Bump version
env:
VERSION: ${{ steps.set-versions.outputs.release-version }}
run: |
echo $VERSION > autoinstrumentation/java/version.txt
- name: Set up git name
run: |
git config user.name opentelemetry-java-bot
git config user.email 97938252+opentelemetry-java-bot@users.noreply.github.com
- name: Create pull request against opentelemetry-operator
env:
VERSION: ${{ steps.set-versions.outputs.release-version }}
# this is the PAT used for "gh pr create" below
GITHUB_TOKEN: ${{ secrets.OPENTELEMETRY_JAVA_BOT_TOKEN }}
run: |
msg="Update opentelemetry-javaagent version to $VERSION"
git commit -a -m "$msg"
# gh pr create doesn't have a way to explicitly specify different head and base
# repositories currently, but it will implicitly pick up the head from a different
# repository if you set up a tracking branch
git push --set-upstream origin update-opentelemetry-javaagent-to-$VERSION
gh pr create --title "$msg" \
--body "$msg" \
--repo open-telemetry/opentelemetry-operator
- uses: actions/checkout@v3
with:
ref: main
# history is needed in order to generate the patch
# history is needed in order to run git format-patch below
fetch-depth: 0

- name: Set up git name
Expand Down

0 comments on commit da1dc66

Please sign in to comment.