From e83bf262786ffd35877ed52da6c7be52d0a6f402 Mon Sep 17 00:00:00 2001 From: Ujstor Date: Thu, 9 May 2024 01:43:09 +0200 Subject: [PATCH] update and test --- README.md | 23 +++++++++++++++++++++-- main.go | 2 +- 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 58c9a3d..9c9bf17 100644 --- a/README.md +++ b/README.md @@ -14,9 +14,9 @@ Variables are defined in `config.yml` and can be updated upon commit for new ima ```yaml docker: - DOCKER_HUB_USERNAME: + DOCKER_HUB_USERNAME: DOCKER_REPO_NAME: - VERSION_PART: # Patch, Minor, Major + VERSION_PART: # Patch, Minor, major ``` If the image does not exist, the default image tag is 0.0.1. Semantic versioning is employed upon commit, automatically incrementing the version @@ -26,3 +26,22 @@ Workflow also requires DockerHub login credentials, username and password config username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} ``` + +## Update Helm chart repo + +Under helm values in config.yml, define REPO (user/repo-name) and CHART name: + +```yaml +github-helm-repo: + REPO: + CHART: +``` +If CI and Docker image push to Docker Hub workflows are successful, the update repo workflow will be triggered, updating the deployment image tag with the latest tag. Actions require write access and a generated Personal Access Token to have the ability to push to another GitHub Repository. + +```yaml + token: ${{ secrets.PAT }} +``` + +This is a proof of conceptm, workflow can be improved to match the requirements of individual use cases. + +Check [Repository](https://github.com/Ujstor/argoCD-test-helm) with the Helm chart that is updated on changes. diff --git a/main.go b/main.go index dcb3643..8fd5f8a 100644 --- a/main.go +++ b/main.go @@ -6,7 +6,7 @@ import ( ) func handler(w http.ResponseWriter, r *http.Request) { - html := `Test3

Welcome to Test1

` + html := `Test4

Welcome to Test4

` _, err := w.Write([]byte(html)) if err != nil { http.Error(w, "Error writing response", http.StatusInternalServerError)