From eb83177b5c6fed3441e8f5b5818288cd124a2bed Mon Sep 17 00:00:00 2001 From: kjeld Schouten-Lebbing Date: Tue, 17 Aug 2021 13:21:13 +0200 Subject: [PATCH] Small workflow tweaking to improve speed a bit --- .github/workflows/apps.release.yaml | 42 ++++++++++++++++++++++++++++- .github/workflows/apps.test.yaml | 14 +++++----- 2 files changed, 49 insertions(+), 7 deletions(-) diff --git a/.github/workflows/apps.release.yaml b/.github/workflows/apps.release.yaml index 6d442560ee4..bceb4ce0213 100644 --- a/.github/workflows/apps.release.yaml +++ b/.github/workflows/apps.release.yaml @@ -15,7 +15,31 @@ on: - '.github/cr.yaml' jobs: + prephelm: + name: Prepare Helm + runs-on: ubuntu-20.04 + steps: + - name: Install Helm + uses: azure/setup-helm@v1 + with: + version: v3.5.3 + + - name: Cache helm repo cache + uses: actions/cache@v2 + with: + key: helmrepocache + path: | + ~/.cache/helm/repository + ~/.config/helm/repositories.yaml + + - name: update helm repo cache + run: | + helm repo add truecharts https://truecharts.org + helm repo add bitnami https://charts.bitnami.com/bitnami + helm repo update + catalog-release: + needs: [prephelm] runs-on: ubuntu-latest container: image: ixsystems/catalog_validation:latest @@ -28,6 +52,13 @@ jobs: GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }} - uses: actions/checkout@v2 name: Checkout + - name: Cache helm repo cache + uses: actions/cache@v2 + with: + key: helmrepocache + path: | + ~/.cache/helm/repository + ~/.config/helm/repositories.yaml - name: Install Helm uses: azure/setup-helm@v1 with: @@ -68,7 +99,7 @@ jobs: for chart in master/charts/${train}/*; do if [ -d "${chart}" ]; then cd ${chart} - helm dependency update + helm dependency update --skip-refresh cd - fi done @@ -126,6 +157,7 @@ jobs: git push helm-release: + needs: [prephelm] runs-on: ubuntu-latest steps: - name: Block concurrent jobs @@ -141,6 +173,14 @@ jobs: fetch-depth: 0 token: ${{ secrets.BOT_TOKEN }} + - name: Cache helm repo cache + uses: actions/cache@v2 + with: + key: helmrepocache + path: | + ~/.cache/helm/repository + ~/.config/helm/repositories.yaml + - name: Configure Git run: | git config user.name "TrueCharts-Bot" diff --git a/.github/workflows/apps.test.yaml b/.github/workflows/apps.test.yaml index 470859a3783..abd93999783 100644 --- a/.github/workflows/apps.test.yaml +++ b/.github/workflows/apps.test.yaml @@ -1,4 +1,4 @@ -name: "Apps: Test & Release" +name: "Apps: Tests" on: pull_request: @@ -14,7 +14,7 @@ on: jobs: prephelm: - name: Get changed Apps + name: Prepare Helm runs-on: ubuntu-20.04 steps: - name: Install Helm @@ -227,10 +227,7 @@ jobs: continue-after-seconds: 180 - uses: actions/checkout@v2 name: Checkout - - name: Install Helm - uses: azure/setup-helm@v1 - with: - version: v3.5.3 + - name: Checkout uses: actions/checkout@v2 with: @@ -251,6 +248,11 @@ jobs: ~/.cache/helm/repository ~/.config/helm/repositories.yaml + - name: Install Helm + uses: azure/setup-helm@v1 + with: + version: v3.5.3 + - name: Remove if release already exists run: | for train in stable incubator develop non-free deprecated