|
@@ -34,6 +34,8 @@ jobs:
|
|
|
- smoke-test
|
|
|
- gradle-plugins
|
|
|
- examples
|
|
|
+ outputs:
|
|
|
+ version: ${{ steps.create-github-release.outputs.version }}
|
|
|
runs-on: ubuntu-latest
|
|
|
steps:
|
|
|
- run: |
|
|
@@ -160,7 +162,8 @@ jobs:
|
|
|
.github/scripts/generate-release-contributors.sh v$PRIOR_VERSION >> /tmp/release-notes.txt
|
|
|
fi
|
|
|
|
|
|
- - name: Create GitHub release
|
|
|
+ - id: create-github-release
|
|
|
+ name: Create GitHub release
|
|
|
env:
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
run: |
|
|
@@ -172,6 +175,8 @@ jobs:
|
|
|
v$VERSION \
|
|
|
opentelemetry-javaagent.jar
|
|
|
|
|
|
+ echo "::set-output name=version::$VERSION"
|
|
|
+
|
|
|
- uses: actions/checkout@v3
|
|
|
with:
|
|
|
# the step below is creating a pull request against main
|
|
@@ -249,40 +254,10 @@ jobs:
|
|
|
--head $branch \
|
|
|
--base main
|
|
|
|
|
|
- - uses: actions/checkout@v3
|
|
|
- with:
|
|
|
- repository: opentelemetry-java-bot/opentelemetry-operator
|
|
|
- # this is the personal access token used for "git push" below
|
|
|
- token: ${{ secrets.BOT_TOKEN }}
|
|
|
-
|
|
|
- - name: Initialize pull request branch
|
|
|
- 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: Update version
|
|
|
- run: |
|
|
|
- echo $VERSION > autoinstrumentation/java/version.txt
|
|
|
-
|
|
|
- - name: Set git user
|
|
|
- run: .github/scripts/set-git-user.sh
|
|
|
-
|
|
|
- - name: Create pull request against opentelemetry-operator
|
|
|
- env:
|
|
|
- # this is the personal access token used for "gh pr create" below
|
|
|
- GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }}
|
|
|
- run: |
|
|
|
- message="Update the javaagent version to $VERSION"
|
|
|
- body="Update the javaagent version to \`$VERSION\`."
|
|
|
-
|
|
|
- # 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 commit -a -m "$message"
|
|
|
- git push --set-upstream origin update-opentelemetry-javaagent-to-${VERSION}
|
|
|
- gh pr create --title "$message" \
|
|
|
- --body "$body" \
|
|
|
- --repo open-telemetry/opentelemetry-operator \
|
|
|
- --base main
|
|
|
+ create-operator-pull-request:
|
|
|
+ needs: release
|
|
|
+ uses: ./.github/workflows/reusable-create-operator-pull-request.yml
|
|
|
+ with:
|
|
|
+ javaagent-version: ${{ needs.release.outputs.version }}
|
|
|
+ secrets:
|
|
|
+ BOT_TOKEN: ${{ secrets.BOT_TOKEN }}
|