-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[release-0.1] Add release workflow (#333)
* Add release workflow Signed-off-by: bmangoen <[email protected]> * Use github.actor vars Signed-off-by: bmangoen <[email protected]> * Workflow in the right directory Signed-off-by: bmangoen <[email protected]> --------- Signed-off-by: bmangoen <[email protected]> Co-authored-by: bmangoen <[email protected]>
- Loading branch information
1 parent
5b1bb9a
commit ca0b178
Showing
2 changed files
with
100 additions
and
0 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,89 @@ | ||
name: Release workflow | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
release_version: | ||
description: "Release version" | ||
required: true | ||
bundle_channels: | ||
description: "Bundle channels" | ||
required: true | ||
default: "candidates" | ||
is_draft_release: | ||
description: "Draft release" | ||
type: boolean | ||
required: false | ||
default: true | ||
is_pre_release: | ||
description: "Pre-release" | ||
type: boolean | ||
required: false | ||
default: false | ||
|
||
run-name: Release ${{ inputs.release_version }} | ||
|
||
env: | ||
GIT_USER: ${{ secrets.GIT_USER }} | ||
GITHUB_TOKEN: ${{ secrets.GIT_TOKEN }} | ||
VERSION: ${{ inputs.release_version }} | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Login to quay.io | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: quay.io | ||
username: ${{ secrets.QUAY_USER }} | ||
password: ${{ secrets.QUAY_PWD }} | ||
|
||
- uses: actions/checkout@v4 | ||
|
||
- name: Build and push operator image | ||
run: | | ||
make docker-buildx \ | ||
-e TAG=$VERSION | ||
- name: Generate bundle metadata | ||
run: | | ||
make bundle \ | ||
-e CHANNELS=$CHANNELS | ||
env: | ||
CHANNELS: ${{ inputs.bundle_channels }} | ||
|
||
- name: Publish bundle in operatorhub.io | ||
run: | | ||
make bundle-publish \ | ||
-e GIT_CONFIG_USER_NAME="$GIT_CONFIG_USER_NAME" \ | ||
-e GIT_CONFIG_USER_EMAIL="$GIT_CONFIG_USER_EMAIL" \ | ||
-e OPERATOR_VERSION=$VERSION \ | ||
-e OPERATOR_HUB=community-operators \ | ||
-e OWNER=k8s-operatorhub \ | ||
-e FORK=maistra | ||
env: | ||
GIT_CONFIG_USER_NAME: "${{ github.actor }}" | ||
GIT_CONFIG_USER_EMAIL: "${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com" | ||
|
||
- name: Publish bundle in OpenShift OperatorHub | ||
run: | | ||
make bundle-publish \ | ||
-e GIT_CONFIG_USER_NAME="$GIT_CONFIG_USER_NAME" \ | ||
-e GIT_CONFIG_USER_EMAIL="$GIT_CONFIG_USER_EMAIL" \ | ||
-e OPERATOR_VERSION=$VERSION \ | ||
-e OWNER=redhat-openshift-ecosystem \ | ||
-e FORK=maistra | ||
env: | ||
GIT_CONFIG_USER_NAME: "${{ github.actor }}" | ||
GIT_CONFIG_USER_EMAIL: "${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com" | ||
|
||
- name: Create GitHub release | ||
run: | | ||
make create-gh-release \ | ||
-e GH_PRE_RELEASE=$GH_PRE_RELEASE \ | ||
-e GH_RELEASE_DRAFT=$GH_RELEASE_DRAFT | ||
env: | ||
GH_PRE_RELEASE: ${{ github.event.inputs.is_pre_release == 'true' }} | ||
GH_RELEASE_DRAFT: ${{ github.event.inputs.is_draft_release == 'true' }} |
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