diff --git a/.github/workflows/make-release.yaml b/.github/workflows/make-release.yaml new file mode 100644 index 0000000..085823d --- /dev/null +++ b/.github/workflows/make-release.yaml @@ -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 }} diff --git a/.github/workflows/release.yaml b/.github/workflows/publish-release.yaml similarity index 95% rename from .github/workflows/release.yaml rename to .github/workflows/publish-release.yaml index 1bec2b1..5233e2e 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/publish-release.yaml @@ -1,4 +1,4 @@ -name: Release +name: Publish Release on: push: @@ -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 }} diff --git a/README.md b/README.md index dd0b5d5..e1e214c 100644 --- a/README.md +++ b/README.md @@ -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 `-tetrate-v`, for example `v1.16.0-tetrate-v0` is the first CVEs fixing patch for v1. 16.0 kubegres. -- Run `IMG=tetrate/kubegres: 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: 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.