From 8e5de4f9d4d6b7f452226f890a8c30257d32aaf5 Mon Sep 17 00:00:00 2001 From: Kjeld Schouten-Lebbing Date: Thu, 10 Nov 2022 10:06:50 +0100 Subject: [PATCH] Update charts-release.yaml Signed-off-by: Kjeld Schouten-Lebbing --- .github/workflows/charts-release.yaml | 163 ++++++++++++++++++++++++-- 1 file changed, 155 insertions(+), 8 deletions(-) diff --git a/.github/workflows/charts-release.yaml b/.github/workflows/charts-release.yaml index 2ada938f6a6..5d433553a0c 100644 --- a/.github/workflows/charts-release.yaml +++ b/.github/workflows/charts-release.yaml @@ -13,6 +13,8 @@ on: jobs: release-scale: runs-on: ubuntu-latest + outputs: + ref: ${{ steps.save-commit-hash.outputs.commit_hash }} container: image: ghcr.io/truecharts/devcontainer:v2.6.0@sha256:5029ebed5c833646da3afb3a8512eba79f08cac8935a53fc1510854fec22341a steps: @@ -172,23 +174,51 @@ jobs: cd - rm -rf catalog + release-helm-important: + runs-on: ubuntu-latest + container: + image: ghcr.io/truecharts/devcontainer:v2.6.0@sha256:5029ebed5c833646da3afb3a8512eba79f08cac8935a53fc1510854fec22341a + needs: release-scale + steps: + - name: Install Kubernetes tools + uses: yokawasa/action-setup-kube-tools@b91bb02bc122bd84ac7bbea5f25ed6b0f2ec6275 # tag=v0.9.2 + with: + setup-tools: | + helmv3 + helm: "3.8.0" + + - name: Install helm-docs + run: | + wget -O /tmp/helm-docs.deb https://github.com/k8s-at-home/helm-docs/releases/download/v0.1.1/helm-docs_0.1.1_Linux_x86_64.deb + sudo dpkg -i /tmp/helm-docs.deb + - name: Prep Helm + run: | + helm repo add truecharts https://charts.truecharts.org + helm repo add truecharts-library https://library-charts.truecharts.org + helm repo add bitnami https://charts.bitnami.com/bitnami + helm repo add metallb https://metallb.github.io/metallb + helm repo add grafana https://grafana.github.io/helm-charts + helm repo add prometheus https://prometheus-community.github.io/helm-charts + helm repo update - name: Checkout uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3 - if: | - steps.collect-changes.outputs.changesDetectedAfterTag == 'true' with: token: ${{ secrets.BOT_TOKEN }} - ref: ${{ steps.save-commit-hash.outputs.commit_hash }} fetch-depth: 0 - + ref: ${{needs.release-scale.outputs.ref}} + + - name: Fix Pre-Commit issues + shell: bash + run: | + echo "Running pre-commit test-and-cleanup..." + pre-commit run --all ||: + # Fix sh files to always be executable + find . -name '*.sh' | xargs chmod +x - name: Configure Git - if: | - steps.collect-changes.outputs.changesDetectedAfterTag == 'true' run: | git config user.name "truecharts-bot" git config user.email "bot@truecharts.org" - - - name: Run chart-releaser + - name: Run chart-releaser for dependency apps uses: helm/chart-releaser-action@98bccfd32b0f76149d188912ac8e45ddd3f8695f # tag=v1.4.1 if: | steps.collect-changes.outputs.changesDetectedAfterTag == 'true' @@ -198,3 +228,120 @@ jobs: env: CR_TOKEN: "${{ secrets.BOT_TOKEN }}" CR_SKIP_EXISTING: "true" + + - name: Run chart-releaser for enterprise apps + uses: helm/chart-releaser-action@98bccfd32b0f76149d188912ac8e45ddd3f8695f # tag=v1.4.1 + if: | + steps.collect-changes.outputs.changesDetectedAfterTag == 'true' + with: + charts_dir: charts/enterprise + charts_repo_url: https://charts.truecharts.org + env: + CR_TOKEN: "${{ secrets.BOT_TOKEN }}" + CR_SKIP_EXISTING: "true" + + release-helm-stable: + runs-on: ubuntu-latest + container: + image: ghcr.io/truecharts/devcontainer:v2.6.0@sha256:5029ebed5c833646da3afb3a8512eba79f08cac8935a53fc1510854fec22341a + needs: release-scale + steps: + - name: Install Kubernetes tools + uses: yokawasa/action-setup-kube-tools@b91bb02bc122bd84ac7bbea5f25ed6b0f2ec6275 # tag=v0.9.2 + with: + setup-tools: | + helmv3 + helm: "3.8.0" + + - name: Install helm-docs + run: | + wget -O /tmp/helm-docs.deb https://github.com/k8s-at-home/helm-docs/releases/download/v0.1.1/helm-docs_0.1.1_Linux_x86_64.deb + sudo dpkg -i /tmp/helm-docs.deb + - name: Prep Helm + run: | + helm repo add truecharts https://charts.truecharts.org + helm repo add truecharts-library https://library-charts.truecharts.org + helm repo add bitnami https://charts.bitnami.com/bitnami + helm repo add metallb https://metallb.github.io/metallb + helm repo add grafana https://grafana.github.io/helm-charts + helm repo add prometheus https://prometheus-community.github.io/helm-charts + helm repo update + - name: Checkout + uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3 + with: + token: ${{ secrets.BOT_TOKEN }} + fetch-depth: 0 + ref: ${{needs.release-scale.outputs.ref}} + + - name: Fix Pre-Commit issues + shell: bash + run: | + echo "Running pre-commit test-and-cleanup..." + pre-commit run --all ||: + # Fix sh files to always be executable + find . -name '*.sh' | xargs chmod +x + - name: Configure Git + run: | + git config user.name "truecharts-bot" + git config user.email "bot@truecharts.org" + - name: Run chart-releaser for stable + uses: helm/chart-releaser-action@98bccfd32b0f76149d188912ac8e45ddd3f8695f # tag=v1.4.1 + with: + charts_dir: charts/stable + charts_repo_url: https://charts.truecharts.org + env: + CR_TOKEN: "${{ secrets.BOT_TOKEN }}" + CR_SKIP_EXISTING: "true" + + release-helm-incubator: + runs-on: ubuntu-latest + container: + image: ghcr.io/truecharts/devcontainer:v2.6.0@sha256:5029ebed5c833646da3afb3a8512eba79f08cac8935a53fc1510854fec22341a + needs: release-scale + steps: + - name: Install Kubernetes tools + uses: yokawasa/action-setup-kube-tools@b91bb02bc122bd84ac7bbea5f25ed6b0f2ec6275 # tag=v0.9.2 + with: + setup-tools: | + helmv3 + helm: "3.8.0" + + - name: Install helm-docs + run: | + wget -O /tmp/helm-docs.deb https://github.com/k8s-at-home/helm-docs/releases/download/v0.1.1/helm-docs_0.1.1_Linux_x86_64.deb + sudo dpkg -i /tmp/helm-docs.deb + - name: Prep Helm + run: | + helm repo add truecharts https://charts.truecharts.org + helm repo add truecharts-library https://library-charts.truecharts.org + helm repo add bitnami https://charts.bitnami.com/bitnami + helm repo add metallb https://metallb.github.io/metallb + helm repo add grafana https://grafana.github.io/helm-charts + helm repo add prometheus https://prometheus-community.github.io/helm-charts + helm repo update + - name: Checkout + uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3 + with: + token: ${{ secrets.BOT_TOKEN }} + fetch-depth: 0 + ref: ${{needs.release-scale.outputs.ref}} + + - name: Fix Pre-Commit issues + shell: bash + run: | + echo "Running pre-commit test-and-cleanup..." + pre-commit run --all ||: + # Fix sh files to always be executable + find . -name '*.sh' | xargs chmod +x + - name: Configure Git + run: | + git config user.name "truecharts-bot" + git config user.email "bot@truecharts.org" + - name: Run chart-releaser for stable + uses: helm/chart-releaser-action@98bccfd32b0f76149d188912ac8e45ddd3f8695f # tag=v1.4.1 + with: + charts_dir: charts/incubator + charts_repo_url: https://charts.truecharts.org + env: + CR_TOKEN: "${{ secrets.BOT_TOKEN }}" + CR_SKIP_EXISTING: "true"