-
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
Signed-off-by: Ruben Vargas <[email protected]>
- Loading branch information
1 parent
4183bb2
commit 237b2d2
Showing
2 changed files
with
56 additions
and
28 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,54 @@ | ||
name: "Prepare the release" | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
description: version of the operator to release | ||
required: true | ||
|
||
jobs: | ||
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${OPERATOR_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${OPERATOR_VERSION} | ||
gh pr create --title='Prepare release v${OPERATOR_VERSION}' --assignee=${{ github.actor }} --reviewer=${{ github.actor }} --body='v${OPERATOR_VERSION}' | ||
env: | ||
OPERATOR_VERSION: ${{inputs.version}} | ||
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