Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions .github/workflows/test-gh.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,21 @@ jobs:
uses: helm/kind-action@v1
with:
install_only: true
- name: Free disk space (before build)
run: |
echo "=== Removing unnecessary packages ==="
sudo rm -rf /opt/hostedtoolcache || true
sudo rm -rf /usr/local/lib/android || true
echo "=== Docker cleanup ==="
docker system prune -af || true
docker volume prune -f || true
echo "=== Cleanup complete ==="
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GHCR_PAT_PACKAGE_ALL }}
- name: Resolve Kubernetes version
id: resolve-k8s-version
run: |
Expand All @@ -29,6 +44,19 @@ jobs:
echo "Resolved latest k8s version to: $k8s_version"
fi
echo "k8s_version=$k8s_version" >> $GITHUB_ENV
- name: Build and push kind image for latest Kubernetes
run: |
k8s_version=v1.36.0
mkdir tmp && cd tmp
git clone https://github.com/kubernetes/kubernetes.git && cd kubernetes
git checkout $k8s_version
git clone https://github.com/kubernetes-sigs/kind.git && cd kind
kind build node-image --type=source $(pwd)/.. --image kindest/node:$k8s_version
docker tag kindest/node:$k8s_version \
ghcr.io/${{ github.repository_owner }}/kindest/node:$k8s_version
docker push ghcr.io/${{ github.repository_owner }}/kindest/node:$k8s_version
cd $(pwd)/../../../
rm -rf tmp && echo "Cleanup completed: Temporary directory 'tmp' has been removed." || echo "Cleanup failed: Could not remove 'tmp' directory."
- name: Create Kind Cluster(k8s version ${{ env.k8s_version }})
run: |
k8s_version=${{ env.k8s_version }}
Expand Down
Loading