diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 682d5823..fb520ebd 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -72,21 +72,21 @@ jobs: run: | git config --global user.email "action@github.com" git config --global user.name "Github Action" - git checkout master + git checkout main make package git add . git commit -m "Publishing $TAG_VERSION to the Helm repository" - git push origin master + git push origin main env: TAG_VERSION: ${{ steps.versioning.outputs.tag_version }} title: Release ${{ github.ref }} - name: Publish to to GHCR run: | - echo ${{ secrets.HELM_TOKEN }} | helm registry login ghcr.io --username ${{ github.actor }} --password-stdin - helm push docs/onechart-${CHART_VERSION}.tgz oci://ghcr.io/opsta - helm push docs/cron-job-${CHART_VERSION}.tgz oci://ghcr.io/opsta - helm push docs/static-site-${STATIC_SITE_CHART_VERSION}.tgz oci://ghcr.io/opsta + echo ${{ secrets.HELM_TOKEN }} | helm registry login ghcr.io --username ${{ github.repository_owner }} --password-stdin + helm push docs/onechart-${CHART_VERSION}.tgz oci://ghcr.io/${{ github.repository_owner }} + helm push docs/cron-job-${CHART_VERSION}.tgz oci://ghcr.io/${{ github.repository_owner }} + helm push docs/static-site-${STATIC_SITE_CHART_VERSION}.tgz oci://ghcr.io/${{ github.repository_owner }} env: CHART_VERSION: ${{ steps.chart_version.outputs.chart_version }} STATIC_SITE_CHART_VERSION: ${{ steps.chart_version.outputs.static_site_chart_version }} @@ -94,7 +94,7 @@ jobs: run: | git config --global user.email "action@github.com" git config --global user.name "Github Action" - git checkout master + git checkout main without_major_version=${CHART_VERSION#*.} without_patch_version=${without_major_version%.*} @@ -106,10 +106,11 @@ jobs: sed -i "s/version: $CHART_VERSION/version: $increased_version/" charts/onechart/Chart.yaml sed -i "s/version: $CHART_VERSION/version: $increased_version/" charts/cron-job/Chart.yaml sed -i "s/version: $CHART_VERSION/version: $increased_version/" charts/static-site/Chart.yaml + sed -i "s/--version $CHART_VERSION/--version $increased_version/" README.md git status git add . git commit -m "The next release version will be $increased_version" - git push origin master + git push origin main env: CHART_VERSION: ${{ steps.chart_version.outputs.chart_version }} diff --git a/README.md b/README.md index a4626a29..59aba0a6 100644 --- a/README.md +++ b/README.md @@ -1,26 +1,31 @@ # One chart to rule them all +This repository is a fork of the [Gimlet OneChart project](https://github.com/gimlet-io/onechart). + A generic Helm chart for your application deployments. Because no-one can remember the Kubernetes yaml syntax. https://gimlet.io/docs/reference/onechart-reference - ## Getting started OneChart is a generic Helm Chart for web applications. The idea is that most Kubernetes manifest look alike, only very few parts actually change. -Add the Onechart Helm repository: +You can also template and install onechart from an OCI repository as follows: + +Check the generated Kubernetes yaml: ```bash -helm repo add onechart https://chart.onechart.dev +helm template my-release oci://ghcr.io/opsta/onechart --version 0.75.0 \ + --set image.repository=nginx \ + --set image.tag=1.19.3 ``` -Set your image name and version, the boilerplate is generated. +Deploy with Helm: ```bash -helm template my-release onechart/onechart \ +helm install my-release oci://ghcr.io/opsta/onechart --version 0.75.0 \ --set image.repository=nginx \ --set image.tag=1.19.3 ``` @@ -28,8 +33,7 @@ helm template my-release onechart/onechart \ The example below deploys your application image, sets environment variables and configures the Kubernetes Ingress domain name: ```bash -helm repo add onechart https://chart.onechart.dev -helm template my-release onechart/onechart -f values.yaml +helm template my-release oci://ghcr.io/opsta/onechart --version 0.75.0 -f values.yaml # values.yaml image: @@ -44,30 +48,9 @@ ingress: host: my-app.mycompany.com ``` -### Alternative: using an OCI repository -You can also template and install onechart from an OCI repository as follows: - -Check the generated Kubernetes yaml: - -```bash -helm template my-release oci://ghcr.io/gimlet-io/onechart --version 0.62.0 \ - --set image.repository=nginx \ - --set image.tag=1.19.3 -``` - -Deploy with Helm: - -```bash -helm install my-release oci://ghcr.io/gimlet-io/onechart --version 0.62.0 \ - --set image.repository=nginx \ - --set image.tag=1.19.3 -``` - -See all [Examples](/website/docs/examples/) - ## Contribution Guidelines -Thank you for your interest in contributing to the Gimlet project. +Thank you for your interest in contributing to the OneChart project. Below are some guidelines and best practices for contributing to this repository: @@ -100,8 +83,5 @@ For installation, refer to the CI workflow at `.github/workflows/build.yaml`. ## Release process -`make all` to test and package the Helm chart. -The chart archives are put under `docs/` together with the Helm repository manifest (index.yaml) -It is then served with Github Pages on https://chart.onechart.dev - -Github Actions is used to automate the make calls on git tag events. +* Create a new tag with the format `v..`. +* Github Actions will be triggered and test, lint, package the Helm chart and push to the OCI repository.