-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (34 loc) · 1.13 KB
/
compose-to-kompose.yml
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
name: Convert Docker Compose to Kubernetes
on:
push:
branches:
- main
workflow_dispatch:
jobs:
convert:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: '1.16'
- name: Install kompose
run: |
curl -L https://github.com/kubernetes/kompose/releases/download/v1.23.0/kompose-linux-amd64 -o kompose
chmod +x kompose
sudo mv kompose /usr/local/bin/
- name: Convert Docker Compose to Kubernetes
run: |
mkdir -p k8s-manifests
kompose convert -f docker-compose.minio-weaviate-python.ts.yaml -o k8s-manifests/
- name: Commit and push the Kubernetes manifests
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git add k8s-manifests
git commit -m "Convert Docker Compose to Kubernetes manifests"
git push
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}