From 5d47061baed17b2cde53d2e6bac490fca272039f Mon Sep 17 00:00:00 2001 From: simon Date: Sun, 25 Feb 2024 12:36:25 +0000 Subject: [PATCH] gitea workflow for build and push smarti-helm-chart (#1) Reviewed-on: https://gitea.simonzeyer.de/schuelerlabor-cleverlab/smarti-helm/pulls/1 --- .gitea/workflows/push-helm-chart.yaml | 27 +++++++++++++++++++++++++++ .gitea/workflows/test.yaml | 21 +++++++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100644 .gitea/workflows/push-helm-chart.yaml create mode 100644 .gitea/workflows/test.yaml diff --git a/.gitea/workflows/push-helm-chart.yaml b/.gitea/workflows/push-helm-chart.yaml new file mode 100644 index 0000000..950a36f --- /dev/null +++ b/.gitea/workflows/push-helm-chart.yaml @@ -0,0 +1,27 @@ +name: Build and Push + +on: + push: + branches: + - master + - releases/* + +jobs: + push: + runs-on: ubuntu-latest + container: + image: catthehacker/ubuntu:act-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 # all history for all branches and tags + - name: Install Helm + run: curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash + - name: pack helm release + run: helm package . + - name: Get Package Name + id: meta + run: echo PACKAGE_NAME=$(ls | grep .tgz) >> $GITHUB_OUTPUT + - name: Push to Package Repo + run: curl --user ${{ secrets.HELM_USER }}:${{ secrets.HELM_PASSWD }} -X POST --upload-file ./${{ steps.meta.outputs.PACKAGE_NAME }} https://gitea.simonzeyer.de/api/packages/schuelerlabor-cleverlab/helm/api/charts diff --git a/.gitea/workflows/test.yaml b/.gitea/workflows/test.yaml new file mode 100644 index 0000000..c009c89 --- /dev/null +++ b/.gitea/workflows/test.yaml @@ -0,0 +1,21 @@ +name: Build and Test + +on: + pull_request: + +jobs: + build: + runs-on: ubuntu-latest + container: + image: catthehacker/ubuntu:act-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 # all history for all branches and tags + - name: Install Helm + run: curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash + - name: Lint Helm Chart + run: helm lint . + - name: pack helm release + run: helm package . \ No newline at end of file