ci: switch Docker build to Kaniko (no daemon required)
This commit is contained in:
parent
f36d150c08
commit
0f42b53ab4
|
|
@ -4,35 +4,35 @@ on: [push]
|
|||
jobs:
|
||||
build-backend:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: gcr.io/kaniko-project/executor:debug
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
|
||||
- name: Build and push Backend
|
||||
uses: docker/build-push-action@v4
|
||||
with:
|
||||
context: ./backend
|
||||
push: true
|
||||
tags: 192.168.8.250:5000/chitfund-backend:latest
|
||||
# Local registry is insecure
|
||||
labels: |
|
||||
org.opencontainers.image.source=${{ gitea.repository_url }}
|
||||
run: |
|
||||
/kaniko/executor \
|
||||
--context=${{ gitea.workspace }}/backend \
|
||||
--dockerfile=${{ gitea.workspace }}/backend/Dockerfile \
|
||||
--destination=192.168.8.250:5000/chitfund-backend:latest \
|
||||
--insecure \
|
||||
--skip-tls-verify \
|
||||
--label org.opencontainers.image.source=${{ gitea.repository_url }}
|
||||
|
||||
build-frontend:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: gcr.io/kaniko-project/executor:debug
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
|
||||
- name: Build and push Frontend
|
||||
uses: docker/build-push-action@v4
|
||||
with:
|
||||
context: ./luckychit
|
||||
push: true
|
||||
tags: 192.168.8.250:5000/chitfund-frontend:latest
|
||||
run: |
|
||||
/kaniko/executor \
|
||||
--context=${{ gitea.workspace }}/luckychit \
|
||||
--dockerfile=${{ gitea.workspace }}/luckychit/Dockerfile \
|
||||
--destination=192.168.8.250:5000/chitfund-frontend:latest \
|
||||
--insecure \
|
||||
--skip-tls-verify
|
||||
Loading…
Reference in New Issue