Skip to content

Commit

Permalink
extend workflow for k8s manifest
Browse files Browse the repository at this point in the history
  • Loading branch information
jamowei committed Dec 12, 2024
1 parent 4f12fe7 commit c909666
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
10 changes: 9 additions & 1 deletion .github/workflows/buildAndRelease.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,14 @@ jobs:
echo "VERSION=${VERSION}" >> $GITHUB_ENV
echo Using name=$NAME and version=$VERSION
- name: Set up Node.js
uses: actions/setup-node@v4

- name: Build Kubernetes Manifest
run: |
npm install
node build.mjs k8s
- name: Set up Docker
uses: docker/setup-buildx-action@v2

Expand All @@ -52,7 +60,7 @@ jobs:
prerelease: false
#body_path: CHANGELOG.md
files: |
*.tgz
out/*k8s.yaml
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
Simple WebApp (SPA) using [esbuild](https://esbuild.github.io/), [jsx-dom](https://www.npmjs.com/package/jsx-dom) and [tailwindcss](https://www.npmjs.com/package/tailwindcss)

# 📑 Requirements
* [Docker](https://www.docker.com/) for building the image
* [NodeJS](https://nodejs.org/) for developing the webapp
* [Helm](https://helm.sh/) for deploying to [Kubernetes](https://kubernetes.io/)
* [Docker](https://www.docker.com/) for building the image
* [kubectl](https://kubernetes.io/de/docs/reference/kubectl/) for deploying to [Kubernetes](https://kubernetes.io/)

# 🏗️ Structure
All source-files for the app resides in the `./src` folder.
Expand Down Expand Up @@ -91,9 +91,9 @@ kubectl delete -f out/${NAME}.k8s.yaml --namespace $(namespace)

# ⚙️ Github Release + Package
Whenever a new commit is pushed on the `main` branch or a pull request is created, the Github workflow gets triggered.
The workflow (`./.github/workflows/buildAndRelease.yaml`) builds the app, Docker image and Helm chart.
The workflow (`./.github/workflows/buildAndRelease.yaml`) builds the app, Docker image and Kubernetes manifest.

To create a Github Release and publish the app, Docker image and Helm chart,
To create a Github Release and publish the app, Docker image and Kubernetes manifest,
you only have to tag the specific commit with `*.*.*` notation ([SemanticVersion](https://semver.org/)).

Just run `make release version=1.0.0` or following commands
Expand Down

0 comments on commit c909666

Please sign in to comment.