-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (39 loc) · 1.3 KB
/
kind.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
name: Create Cluster with Registry
on:
push: {}
jobs:
setup-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Docker registry
run: |
docker network create kind || true
docker run -d --network kind --name registry -p 5000:5000 registry:2
- name: Set up Kind cluster
uses: helm/kind-action@v1.7.0
with:
version: v0.20.0
env:
KIND_EXPERIMENTAL_DOCKER_NETWORK: kind
- name: Connect Kind to the Docker registry
run: |
cat <<EOF > kind-config.yaml
apiVersion: kind.x-k8s.io/v1alpha4
kind: Cluster
containerdConfigPatches:
- |
[plugins."io.containerd.grpc.v1.cri".registry.mirrors."localhost:5000"]
endpoint = ["http://registry:5000"]
EOF
kind create cluster --config kind-config.yaml
- name: Build Docker image
run: |
docker build \
-t localhost:5000/ctferio/chall-manager-janitor:${{ github.sha }} \
-f Docker.chall-manager-janitor \
.
- name: Push Docker image to local registry
run: |
docker push localhost:5000/ctferio/chall-manager-janitor:${{ github.sha }}