Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add action to release new versions #23

Open
wants to merge 2 commits into
base: release-v1.16.x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions .github/workflows/make-release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Create Release

on:
workflow_dispatch:
inputs:
version:
description: 'Version to release in the format v0.0.0-tetrate-v0'
required: true
branch:
description: 'Branch to release from. Like release-v0.0.0'
required: true

jobs:
update-kubegres-yaml:
runs-on: ubuntu-latest
env:
IMG: tetrate/kubegres:${{ github.event.inputs.version }}
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.branch }}
- name: Update kubegres.yaml
run: make deploy
- name: Create and push the new tag
run: |
git add kubegres.yaml config/manager/kustomization.yaml
git commit -m "pre-release-tag: Update kubegres.yaml to version ${{ github.event.inputs.version }}"
git push origin ${{ github.event.inputs.branch }}
git tag ${{ github.event.inputs.version }}
git push origin ${{ github.event.inputs.version }}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Release
name: Publish Release

on:
push:
Expand All @@ -8,7 +8,7 @@ env:
GOPROXY: https://proxy.golang.org

jobs:
docker-hub:
docker-hub-push:
runs-on: ubuntu-latest
env:
IMG: tetrate/kubegres:${{ github.ref_name }}
Expand Down
15 changes: 9 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,12 @@ and on [https://www.kubegres.io](https://www.kubegres.io). More details in the [

While waiting for PRs to be accepted in the upstream repository and a new version to be released, follow the next instructions to publish our own builds:
- Define the new version name by following the pattern `<current-version>-tetrate-v<patch-number>`, for example `v1.16.0-tetrate-v0` is the first CVEs fixing patch for v1. 16.0 kubegres.
- Run `IMG=tetrate/kubegres:<new-version> make deploy` with the new version tag to update `kubegres.yaml` file and open a PR with the changes.
- Once the PR is approved and merged create a tag with the new version and push it to the repository. Check that this triggers the release action that will:
- Scan for CVEs in the new version.
- Build the binaries for the new version.
- Build the docker images and push them to the tetrate docker hub repository.
- Run acceptance tests.
- Once the PR is approved:
- Run the Make Release including the new version name and the source branch from where make the release. This will:
- Update the kubegres.yaml file with the new version. By running `IMG=tetrate/kubegres:<new-version> make deploy`.
- Create the tag and push it to the repository, along to the new commit in the given branch.
- Once this action is done, the release action will be triggered and will:
- Scan for CVEs in the new version.
- Build the binaries for the new version.
- Build the docker images and push them to the tetrate docker hub repository.
- Run acceptance tests.