Skip to content

feat: Cache CI-built cloud-provider-kind Docker image #152

feat: Cache CI-built cloud-provider-kind Docker image

feat: Cache CI-built cloud-provider-kind Docker image #152

Workflow file for this run

name: integration
on:
push:
branches:
- main
pull_request:
jobs:
single-trust-zone:
name: single trust zone
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install just
uses: taiki-e/install-action@just
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Build and run tests
run: just build
- name: Cache Docker images
uses: ./.github/actions/
with:
images: cloud-provider-kind-cloud-provider:latest
- name: Install kind
run: just install-kind
- name: Save Docker images to cache
run: |
mkdir -p /tmp/docker-cache
# Caches all images
# docker save $(docker images --filter=reference='*:*' --format='{{.Repository}}:{{.Tag}}') > /tmp/docker-cache/pulled-images.tar
docker save cloud-provider-kind-cloud-provider:latest > /tmp/docker-cache/pulled-images.tar
- name: Install ko
uses: ko-build/[email protected]
env:
KO_DOCKER_REPO: kind.local
- name: Create a kind cluster
run: just create-kind-cluster
- name: Test
run: just integration-test single-trust-zone
federation:
name: federation
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install just
uses: taiki-e/install-action@just
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Build and run tests
run: just build
- name: Cache Docker images
uses: ./.github/actions/
with:
images: cloud-provider-kind-cloud-provider:latest
- name: Install kind
run: just install-kind
- name: Save Docker images to cache
run: |
mkdir -p /tmp/docker-cache
# Caches all images
# docker save $(docker images --filter=reference='*:*' --format='{{.Repository}}:{{.Tag}}') > /tmp/docker-cache/pulled-images.tar
docker save cloud-provider-kind-cloud-provider:latest > /tmp/docker-cache/pulled-images.tar
- name: Install ko
uses: ko-build/[email protected]
env:
KO_DOCKER_REPO: kind.local
- name: Create kind clusters
run: just create-kind-clusters 2
- name: Test
run: just integration-test federation