ci: cache Helm binary in CI to eliminate per-job download overhead #10758
@@ -10,6 +10,7 @@ env:
|
||||
UV_VERSION: "0.8.0"
|
||||
PYTHON_VERSION: "3.13"
|
||||
NOX_DEFAULT_VENV_BACKEND: "uv"
|
||||
HELM_VERSION: "v3.16.4"
|
||||
|
||||
# Logging policy (server-load reduction):
|
||||
# The Forgejo server stores every line a step streams to its console as the
|
||||
@@ -217,9 +218,18 @@ jobs:
|
||||
run: |
|
||||
apt-get update -qq && apt-get install -y -qq nodejs git curl tar && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
- name: Cache Helm binary
|
||||
uses: actions/cache@v3
|
||||
id: helm-cache
|
||||
with:
|
||||
path: /usr/local/bin/helm
|
||||
key: helm-${{ env.HELM_VERSION }}-linux-amd64
|
||||
restore-keys: |
|
||||
helm-
|
||||
|
||||
- name: Install Helm CLI
|
||||
if: steps.helm-cache.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
HELM_VERSION="v3.16.4"
|
||||
ARCH="amd64"
|
||||
HELM_TARBALL="helm-${HELM_VERSION}-linux-${ARCH}.tar.gz"
|
||||
curl -fsSL "https://get.helm.sh/${HELM_TARBALL}" -o "/tmp/${HELM_TARBALL}"
|
||||
@@ -228,7 +238,8 @@ jobs:
|
||||
tar -xzf "/tmp/${HELM_TARBALL}" -C /tmp
|
||||
mv /tmp/linux-${ARCH}/helm /usr/local/bin/helm
|
||||
chmod +x /usr/local/bin/helm
|
||||
helm version --short
|
||||
env:
|
||||
HELM_VERSION: ${{ env.HELM_VERSION }}
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
@@ -280,9 +291,18 @@ jobs:
|
||||
run: |
|
||||
apt-get update -qq && apt-get install -y -qq nodejs git curl tar && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
- name: Cache Helm binary
|
||||
uses: actions/cache@v3
|
||||
id: helm-cache
|
||||
with:
|
||||
path: /usr/local/bin/helm
|
||||
key: helm-${{ env.HELM_VERSION }}-linux-amd64
|
||||
restore-keys: |
|
||||
helm-
|
||||
|
||||
- name: Install Helm CLI
|
||||
if: steps.helm-cache.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
HELM_VERSION="v3.16.4"
|
||||
ARCH="amd64"
|
||||
HELM_TARBALL="helm-${HELM_VERSION}-linux-${ARCH}.tar.gz"
|
||||
curl -fsSL "https://get.helm.sh/${HELM_TARBALL}" -o "/tmp/${HELM_TARBALL}"
|
||||
@@ -291,7 +311,8 @@ jobs:
|
||||
tar -xzf "/tmp/${HELM_TARBALL}" -C /tmp
|
||||
mv /tmp/linux-${ARCH}/helm /usr/local/bin/helm
|
||||
chmod +x /usr/local/bin/helm
|
||||
helm version --short
|
||||
env:
|
||||
HELM_VERSION: ${{ env.HELM_VERSION }}
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
@@ -563,9 +584,18 @@ jobs:
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Cache Helm binary
|
||||
uses: actions/cache@v3
|
||||
id: helm-cache
|
||||
with:
|
||||
path: /usr/local/bin/helm
|
||||
key: helm-${{ env.HELM_VERSION }}-linux-amd64
|
||||
restore-keys: |
|
||||
helm-
|
||||
|
||||
- name: Install Helm CLI
|
||||
if: steps.helm-cache.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
HELM_VERSION="v3.16.4"
|
||||
ARCH="amd64"
|
||||
HELM_TARBALL="helm-${HELM_VERSION}-linux-${ARCH}.tar.gz"
|
||||
curl -fsSL "https://get.helm.sh/${HELM_TARBALL}" -o "/tmp/${HELM_TARBALL}"
|
||||
@@ -574,7 +604,8 @@ jobs:
|
||||
tar -xzf "/tmp/${HELM_TARBALL}" -C /tmp
|
||||
mv /tmp/linux-${ARCH}/helm /usr/local/bin/helm
|
||||
chmod +x /usr/local/bin/helm
|
||||
helm version --short
|
||||
env:
|
||||
HELM_VERSION: ${{ env.HELM_VERSION }}
|
||||
|
||||
- name: Install kubeconform
|
||||
run: |
|
||||
|
||||
Reference in New Issue
Block a user