Skip to content

Commit c672a67

Browse files
committed
test
Signed-off-by: emdneto <9735060+emdneto@users.noreply.github.com>
1 parent 0844b5e commit c672a67

1 file changed

Lines changed: 16 additions & 11 deletions

File tree

.github/workflows/prepare-release-branch.yml

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,6 @@ jobs:
2222
env:
2323
PRERELEASE_VERSION: ${{ github.event.inputs.prerelease_version }}
2424
run: |
25-
if [[ $GITHUB_REF_NAME != main ]]; then
26-
echo this workflow should only be run against main
27-
exit 1
28-
fi
29-
3025
if ! grep --quiet "^## Unreleased$" CHANGELOG.md; then
3126
echo the change log is missing an \"Unreleased\" section
3227
exit 1
@@ -48,7 +43,18 @@ jobs:
4843
runs-on: ubuntu-latest
4944
needs: prereqs
5045
steps:
46+
- uses: actions/create-github-app-token@df432ceedc7162793a195dd1713ff69aefc7379e # v2.0.6
47+
id: otelbot-token
48+
with:
49+
app-id: ${{ vars.OTELBOT_APP_ID }}
50+
private-key: ${{ secrets.OTELBOT_PRIVATE_KEY }}
51+
permission-contents: write
52+
permission-pull-requests: write
53+
permission-workflows: write
54+
5155
- uses: actions/checkout@v4
56+
with:
57+
token: ${{ steps.otelbot-token.outputs.token }}
5258

5359
- name: Install toml
5460
run: pip install toml
@@ -93,15 +99,14 @@ jobs:
9399
date=$(date "+%Y-%m-%d")
94100
sed -Ei "s/^## Unreleased$/## Version ${STABLE_VERSION}\/${UNSTABLE_VERSION} ($date)/" CHANGELOG.md
95101
102+
- name: Update contrib workflow ref
103+
run: |
104+
sed -Ei "s#open-telemetry/opentelemetry-python-contrib/.github/workflows/core_contrib_test.yml@main#open-telemetry/opentelemetry-python-contrib/.github/workflows/core_contrib_test.yml@${STABLE_VERSION}#" .github/workflows/ci.yml
105+
grep -Fq "core_contrib_test.yml@${STABLE_VERSION}" .github/workflows/ci.yml
106+
96107
- name: Use CLA approved github bot
97108
run: .github/scripts/use-cla-approved-github-bot.sh
98109

99-
- uses: actions/create-github-app-token@df432ceedc7162793a195dd1713ff69aefc7379e # v2.0.6
100-
id: otelbot-token
101-
with:
102-
app-id: ${{ vars.OTELBOT_APP_ID }}
103-
private-key: ${{ secrets.OTELBOT_PRIVATE_KEY }}
104-
105110
- name: Create pull request against the release branch
106111
id: create_release_branch_pr
107112
env:

0 commit comments

Comments
 (0)