-
Notifications
You must be signed in to change notification settings - Fork 25
[feat] add helm chart for kubernetes #172
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
574ea7c
419bd64
ae7356f
43881e8
542423a
7b0707b
02ba8ad
800c58d
2593e33
a4114e6
2ef390f
acc8f6d
26bd4ae
34ec506
4c66ebc
cb9d7e7
20196ba
0382d70
33a4c21
60147a5
0ca4786
3978267
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
name: Release Charts | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
paths: | ||
- 'deployments/kubernetes/**' | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
fetch-tags: true | ||
|
||
- name: Configure Git | ||
run: | | ||
git config user.name "$GITHUB_ACTOR" | ||
git config user.email "[email protected]" | ||
|
||
- name: Install yq | ||
uses: mikefarah/yq@v4 | ||
|
||
Comment on lines
+28
to
+30
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fix: yq action is misused; subsequent
Apply: @@
- - name: Install yq
- uses: mikefarah/yq@v4
+ # (remove separate install; we'll invoke yq via its action below)
@@
- name: Get last Git tag
id: get_tag
# Forks will not have tags, so it won't change the version
run: |
TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "")
echo "tag=$TAG" >> $GITHUB_OUTPUT
+ # Derive app version once and export for later steps
+ APPVERSION="${TAG#v}"
+ echo "APPVERSION=$APPVERSION" >> $GITHUB_ENV
@@
- - name: Update appVersion in Chart.yaml for release
- if: steps.get_tag.outputs.tag != ''
- run: |
- FILE="deployments/kubernetes/sms-gateway-server/Chart.yaml"
- TAG="${{ steps.get_tag.outputs.tag }}"
-
- # Strip leading 'v' if present
- APPVERSION="${TAG#v}"
-
- echo "Temporarily updating appVersion in $FILE to $APPVERSION for release"
- yq -i ".appVersion = \"$APPVERSION\"" "$FILE"
+ - name: Update appVersion in Chart.yaml for release
+ if: steps.get_tag.outputs.tag != ''
+ uses: mikefarah/yq@v4
+ env:
+ FILE: deployments/kubernetes/sms-gateway-server/Chart.yaml
+ with:
+ cmd: yq -i '.appVersion = strenv(APPVERSION)' "$FILE" Also applies to: 38-49 🤖 Prompt for AI Agents
|
||
- name: Get last Git tag | ||
id: get_tag | ||
# Forks will not have tags, so it won't change the version | ||
run: | | ||
TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "") | ||
echo "tag=$TAG" >> $GITHUB_OUTPUT | ||
|
||
- name: Update appVersion in Chart.yaml for release | ||
if: steps.get_tag.outputs.tag != '' | ||
run: | | ||
FILE="deployments/kubernetes/sms-gateway-server/Chart.yaml" | ||
TAG="${{ steps.get_tag.outputs.tag }}" | ||
|
||
# Strip leading 'v' if present | ||
APPVERSION="${TAG#v}" | ||
|
||
echo "Temporarily updating appVersion in $FILE to $APPVERSION for release" | ||
yq -i ".appVersion = \"$APPVERSION\"" "$FILE" | ||
|
||
- name: Run chart-releaser | ||
id: cr | ||
uses: helm/[email protected] | ||
eznix86 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
env: | ||
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | ||
with: | ||
charts_dir: ./deployments/kubernetes |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Patterns to ignore when building packages. | ||
# This supports shell glob matching, relative path matching, and | ||
# negation (prefixed with !). Only one pattern per line. | ||
.DS_Store | ||
# Common VCS dirs | ||
.git/ | ||
.gitignore | ||
.bzr/ | ||
.bzrignore | ||
.hg/ | ||
.hgignore | ||
.svn/ | ||
# Common backup files | ||
*.swp | ||
*.bak | ||
*.tmp | ||
*.orig | ||
*~ | ||
# Various IDEs | ||
.project | ||
.idea/ | ||
*.tmproj | ||
.vscode/ |
eznix86 marked this conversation as resolved.
Show resolved
Hide resolved
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
apiVersion: v2 | ||
name: sms-gateway-server | ||
description: A Helm chart for Kubernetes to deploy sms-gateway-server. | ||
|
||
type: application | ||
|
||
version: 0.2.11 | ||
|
||
# appVersion is always updated in CI | ||
appVersion: "latest" | ||
eznix86 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
home: https://github.com/android-sms-gateway/server | ||
sources: | ||
- https://github.com/android-sms-gateway/server | ||
maintainers: | ||
- name: SMSGate Team | ||
email: [email protected] |
Uh oh!
There was an error while loading. Please reload this page.