Skip to content

Expand kustomize test coverage and update for later kustomize format … #30

Expand kustomize test coverage and update for later kustomize format …

Expand kustomize test coverage and update for later kustomize format … #30

Workflow file for this run

name: Cache Images
on:
push:
paths:
- '.github/workflows/docker.yml'
jobs:
cache-images:
strategy:
matrix:
image:
- rancher/k3s:v1.31.2-k3s1
- rancher/k3s:v1.30.6-k3s1
- rancher/k3s:v1.29.10-k3s1
- rancher/k3s:v1.28.15-k3s1
- rancher/k3s:v1.27.16-k3s1
- rancher/k3s:v1.26.15-k3s1
- rancher/k3s:v1.25.16-k3s4
- registry:2
if: github.event.pull_request.user.login != 'dependabot[bot]' && github.actor != 'dependabot[bot]'
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
attestations: write
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{github.actor}}
password: ${{secrets.GITHUB_TOKEN}}
- name: Cache images
run: |
new_image_tag="ghcr.io/gavinbunney/terraform-provider-kubectl/testacc-$(echo '${{matrix.image}}' | sed 's/\//-/')"
echo "Caching ${{matrix.image}} as $new_image_tag"
docker rmi ${{matrix.image}} --force
docker pull ${{matrix.image}} --platform linux/amd64
docker tag ${{matrix.image}} $new_image_tag-amd64
docker push $new_image_tag-amd64
docker tag ${{matrix.image}} $new_image_tag-x86_64
docker push $new_image_tag-x86_64
docker rmi ${{matrix.image}} --force
docker pull ${{matrix.image}} --platform linux/arm64
docker tag ${{matrix.image}} $new_image_tag-arm64
docker push $new_image_tag-arm64