Create PR in operator repo on javaagent release. (#5710)

* File issue in operator repo on javaagent release.

* Open PR instead of issue

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
This commit is contained in:
Anuraag Agrawal 2022-04-02 02:04:30 +09:00 committed by GitHub
parent 6c7336b978
commit da1dc66512
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 45 additions and 1 deletions

View File

@ -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