From b0eb002e69fa95528f60601aaaec79006559c554 Mon Sep 17 00:00:00 2001 From: Marko Oldenburg Date: Tue, 29 Oct 2024 08:51:03 +0000 Subject: [PATCH] =?UTF-8?q?.gitea/workflows/build-chart-audiobookshelf.yml?= =?UTF-8?q?=20hinzugef=C3=BCgt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../workflows/build-chart-audiobookshelf.yml | 42 +++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .gitea/workflows/build-chart-audiobookshelf.yml diff --git a/.gitea/workflows/build-chart-audiobookshelf.yml b/.gitea/workflows/build-chart-audiobookshelf.yml new file mode 100644 index 0000000..f9e95bd --- /dev/null +++ b/.gitea/workflows/build-chart-audiobookshelf.yml @@ -0,0 +1,42 @@ +name: "Build Helm Chart" +on: + push: + branches: + - main + paths: + - "charts/audiobookshelf/Chart.yaml" + +jobs: + helm-package: + runs-on: ubuntu-latest + env: + APP: charts/audiobookshelf + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Set Helm Chart App Name and Version + id: get_version + run: | + APP_NAME=$(grep -oP '(?<=^name: ).*' ${{ env.APP }}/Chart.yaml) + echo "Helm Chart App Name: $APP_NAME" + echo "::set-output name=app::$APP_NAME" + + CHART_VERSION=$(grep -oP '(?<=^version: ).*' ${{ env.APP }}/Chart.yaml) + echo "Helm Chart version: $CHART_VERSION" + echo "::set-output name=tag::$CHART_VERSION" + + - name: Setup Helm + run: | + curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash + helm version + + - name: Package Helm Chart + run: | + helm dependency update ${{ env.APP }} + helm lint ${{ env.APP }} + helm package ${{ env.APP }} + + - name: Upload Helm Package to repo + run: | + curl --user ${{ secrets.USER }}:${{ secrets.TOKEN }} -X POST --upload-file ./${{ steps.get_version.outputs.app }}-${{ steps.get_version.outputs.tag }}.tgz ${{ vars.HELMREGISTRY }}/api/packages/${{ vars.OWNER }}/helm/api/charts \ No newline at end of file