-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Generate PR for release instead of commit to main (#658)
* Generate PR for release instead of commit to main Signed-off-by: Ruben Vargas <[email protected]> * update RELEASE.md documentation Signed-off-by: Ruben Vargas <[email protected]> --------- Signed-off-by: Ruben Vargas <[email protected]>
- Loading branch information
1 parent
cce533e
commit 165a208
Showing
3 changed files
with
59 additions
and
31 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,53 @@ | ||
name: "Prepare the release" | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
description: version of the operator to release | ||
required: true | ||
|
||
jobs: | ||
prepare-release: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Set up Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: "1.20" | ||
|
||
- name: Generate token | ||
id: generate_token | ||
uses: tibdex/github-app-token@v2 | ||
with: | ||
app_id: ${{ secrets.PUBLISH_APP_ID }} | ||
private_key: ${{ secrets.PUBLISH_APP_PRIVATE_KEY }} | ||
installation_retrieval_payload: ${{ secrets.PUBLISH_APP_INSTALLATION_ID }} | ||
installation_retrieval_mode: id | ||
|
||
- uses: actions/checkout@v4 | ||
with: | ||
token: ${{ steps.generate_token.outputs.token }} | ||
|
||
- name: Generate bundle | ||
run: make bundle | ||
env: | ||
OPERATOR_VERSION: ${{inputs.version}} | ||
IMG_PREFIX: ghcr.io/grafana/tempo-operator | ||
|
||
- name: Generate CHANGELOG | ||
run: make chlog-update | ||
env: | ||
OPERATOR_VERSION: ${{inputs.version}} | ||
|
||
# Commit all changed files back to the repository | ||
- name: Commit the changes to the repository and create PR | ||
run: | | ||
git config user.name "github-actions[bot]" | ||
git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | ||
git checkout -b release/v${{ inputs.version }} | ||
git add -A | ||
git commit -m "Prepare Release ${{inputs.version}}" --author="${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>" | ||
git push -f --set-upstream origin release/v${{ inputs.version }} | ||
gh pr create --title='Prepare release v${{ inputs.version }}' --assignee=${{ github.actor }} --reviewer=${{ github.actor }} --body='v${{ inputs.version }}' | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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
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