Skip to content

Commit

Permalink
update and test
Browse files Browse the repository at this point in the history
  • Loading branch information
Ujstor committed May 8, 2024
1 parent cecc5cc commit e83bf26
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 3 deletions.
23 changes: 21 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
)

func handler(w http.ResponseWriter, r *http.Request) {
html := `<html><head><title>Test3</title></head><body><h1>Welcome to Test1</h1></body></html>`
html := `<html><head><title>Test4</title></head><body><h1>Welcome to Test4</h1></body></html>`
_, err := w.Write([]byte(html))
if err != nil {
http.Error(w, "Error writing response", http.StatusInternalServerError)
Expand Down

0 comments on commit e83bf26

Please sign in to comment.