Compare commits

..

8 Commits

Author SHA1 Message Date
2657f162c4 proper path 2025-03-14 16:07:39 -05:00
b7d53203da add github workflow 2025-03-14 16:05:53 -05:00
21a646dabd add name 2025-03-14 15:53:55 -05:00
0d15a1dadd change tag 2025-03-14 15:52:37 -05:00
a7fe403702 change env 2025-03-14 15:47:53 -05:00
34957e0c18 export env proper 2025-03-14 15:45:08 -05:00
a9286227f7 use workflow 2025-03-14 15:38:00 -05:00
3f6faacaa1 change dir 2025-03-14 15:34:09 -05:00
4 changed files with 56 additions and 15 deletions

View File

@@ -9,6 +9,9 @@ on:
workflow_dispatch: workflow_dispatch:
env:
WORKFLOW_DIR: "charts/cloudflared"
jobs: jobs:
release: release:
runs-on: ubuntu-latest runs-on: ubuntu-latest
@@ -24,7 +27,7 @@ jobs:
- name: Package Helm Chart - name: Package Helm Chart
run: | run: |
cd charts/cloudflared cd $WORKFLOW_DIR
helm dependency build helm dependency build
echo "PACKAGE_PATH=$(helm package . | awk '{print $NF}')" >> $GITEA_ENV echo "PACKAGE_PATH=$(helm package . | awk '{print $NF}')" >> $GITEA_ENV
@@ -41,13 +44,14 @@ jobs:
- name: Extract Chart Metadata - name: Extract Chart Metadata
run: | run: |
CHART_VERSION=$(yq '.version' Chart.yaml) cd $WORKFLOW_DIR
CHART_NAME=$(yq '.name' Chart.yaml) echo "CHART_VERSION=$(yq '.version' Chart.yaml)" >> $GITEA_ENV
echo "CHART_NAME=$(yq '.name' Chart.yaml)" >> $GITEA_ENV
- name: Release Helm Chart - name: Release Helm Chart
uses: akkuman/gitea-release-action@v1 uses: akkuman/gitea-release-action@v1
with: with:
name: $CHART_NAME name: ${{ env.CHART_NAME }}-${{ env.CHART_VERSION }}
tag_name: $CHART_VERSION tag_name: ${{ env.CHART_NAME }}-${{ env.CHART_VERSION }}
files: |- files: |-
${{ env.PACKAGE_PATH }} ${{ env.PACKAGE_PATH }}

View File

@@ -9,6 +9,9 @@ on:
workflow_dispatch: workflow_dispatch:
env:
WORKFLOW_DIR: "charts/generic-device-plugin"
jobs: jobs:
release: release:
runs-on: ubuntu-latest runs-on: ubuntu-latest
@@ -24,7 +27,7 @@ jobs:
- name: Package Helm Chart - name: Package Helm Chart
run: | run: |
cd charts/generic-device-plugin cd $WORKFLOW_DIR
helm dependency build helm dependency build
echo "PACKAGE_PATH=$(helm package . | awk '{print $NF}')" >> $GITEA_ENV echo "PACKAGE_PATH=$(helm package . | awk '{print $NF}')" >> $GITEA_ENV
@@ -41,13 +44,14 @@ jobs:
- name: Extract Chart Metadata - name: Extract Chart Metadata
run: | run: |
CHART_VERSION=$(yq '.version' Chart.yaml) cd $WORKFLOW_DIR
CHART_NAME=$(yq '.name' Chart.yaml) echo "CHART_VERSION=$(yq '.version' Chart.yaml)" >> $GITEA_ENV
echo "CHART_NAME=$(yq '.name' Chart.yaml)" >> $GITEA_ENV
- name: Release Helm Chart - name: Release Helm Chart
uses: akkuman/gitea-release-action@v1 uses: akkuman/gitea-release-action@v1
with: with:
name: $CHART_NAME name: ${{ env.CHART_NAME }}-${{ env.CHART_VERSION }}
tag_name: $CHART_VERSION tag_name: ${{ env.CHART_NAME }}-${{ env.CHART_VERSION }}
files: |- files: |-
${{ env.PACKAGE_PATH }} ${{ env.PACKAGE_PATH }}

View File

@@ -9,6 +9,9 @@ on:
workflow_dispatch: workflow_dispatch:
env:
WORKFLOW_DIR: "charts/postgres-cluster"
jobs: jobs:
release: release:
runs-on: ubuntu-latest runs-on: ubuntu-latest
@@ -24,7 +27,7 @@ jobs:
- name: Package Helm Chart - name: Package Helm Chart
run: | run: |
cd charts/postgres-cluster cd $WORKFLOW_DIR
helm dependency build helm dependency build
echo "PACKAGE_PATH=$(helm package . | awk '{print $NF}')" >> $GITEA_ENV echo "PACKAGE_PATH=$(helm package . | awk '{print $NF}')" >> $GITEA_ENV
@@ -41,13 +44,14 @@ jobs:
- name: Extract Chart Metadata - name: Extract Chart Metadata
run: | run: |
CHART_VERSION=$(yq '.version' Chart.yaml) cd $WORKFLOW_DIR
CHART_NAME=$(yq '.name' Chart.yaml) echo "CHART_VERSION=$(yq '.version' Chart.yaml)" >> $GITEA_ENV
echo "CHART_NAME=$(yq '.name' Chart.yaml)" >> $GITEA_ENV
- name: Release Helm Chart - name: Release Helm Chart
uses: akkuman/gitea-release-action@v1 uses: akkuman/gitea-release-action@v1
with: with:
name: $CHART_NAME name: ${{ env.CHART_NAME }}-${{ env.CHART_VERSION }}
tag_name: $CHART_VERSION tag_name: ${{ env.CHART_NAME }}-${{ env.CHART_VERSION }}
files: |- files: |-
${{ env.PACKAGE_PATH }} ${{ env.PACKAGE_PATH }}

29
.github/workflows/release-charts.yml vendored Normal file
View File

@@ -0,0 +1,29 @@
name: release-charts
on:
push:
branches:
- main
paths:
- "charts/**"
jobs:
release:
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
- name: Run chart-releaser
uses: helm/chart-releaser-action@v1.7.0
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"