Add k8s test action and build test image
This commit is contained in:
parent
70384eae3c
commit
beff7c9f08
24
.github/actions/test-in-k8s/action.yaml
vendored
Normal file
24
.github/actions/test-in-k8s/action.yaml
vendored
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
name: Test in Kubernetes
|
||||||
|
description: Run tests in Kubernetes (KIND)
|
||||||
|
|
||||||
|
inputs:
|
||||||
|
test-image-tag:
|
||||||
|
description: Image to load
|
||||||
|
|
||||||
|
runs:
|
||||||
|
using: composite
|
||||||
|
steps:
|
||||||
|
- name: Install Kubernetes
|
||||||
|
uses: helm/kind-action@v1.8.0
|
||||||
|
- name: Load test image
|
||||||
|
run: |
|
||||||
|
kind load docker-image ${{ inputs.test-image-tag }}
|
||||||
|
shell: bash
|
||||||
|
- name: Install Traefik
|
||||||
|
run: |
|
||||||
|
helm install traefik traefik --repo https://traefik.github.io/charts --wait --timeout 120s
|
||||||
|
shell: bash
|
||||||
|
- name: Install Homepage
|
||||||
|
run: |
|
||||||
|
helm install homepage homepage --repo http://jameswynn.github.io/helm-charts --wait --timeout 120s
|
||||||
|
shell: bash
|
||||||
24
.github/workflows/docker-publish.yml
vendored
24
.github/workflows/docker-publish.yml
vendored
@ -84,6 +84,30 @@ jobs:
|
|||||||
flavor: |
|
flavor: |
|
||||||
latest=auto
|
latest=auto
|
||||||
|
|
||||||
|
# Build and load Docker image with Buildx
|
||||||
|
# https://github.com/docker/build-push-action
|
||||||
|
- name: Build and load Docker image
|
||||||
|
uses: docker/build-push-action@v5
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
load: true
|
||||||
|
tags: test
|
||||||
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
|
build-args: |
|
||||||
|
BUILDTIME=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.created'] }}
|
||||||
|
VERSION=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.version'] }}
|
||||||
|
REVISION=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.revision'] }}
|
||||||
|
# https://github.com/docker/setup-qemu-action#about
|
||||||
|
# platforms: linux/amd64,linux/arm64,linux/riscv64,linux/ppc64le,linux/s390x,linux/386,linux/mips64le,linux/mips64,linux/arm/v7,linux/arm/v6
|
||||||
|
platforms: linux/amd64
|
||||||
|
cache-from: type=gha
|
||||||
|
cache-to: type=gha,mode=max
|
||||||
|
|
||||||
|
- name: Test in Kubernetes
|
||||||
|
uses: ./.gitbub/actions/test-in-k8s
|
||||||
|
with:
|
||||||
|
test-image-tag: test
|
||||||
|
|
||||||
# Build and push Docker image with Buildx (don't push on PR)
|
# Build and push Docker image with Buildx (don't push on PR)
|
||||||
# https://github.com/docker/build-push-action
|
# https://github.com/docker/build-push-action
|
||||||
- name: Build and push Docker image
|
- name: Build and push Docker image
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user