ci: migrate to buildx docker-container driver with standalone buildkitd
CI/CD / build-and-push (push) Successful in 1m39s
CI/CD / build-and-push (push) Successful in 1m39s
This commit is contained in:
+35
-11
@@ -6,7 +6,7 @@ on:
|
|||||||
- main
|
- main
|
||||||
|
|
||||||
env:
|
env:
|
||||||
REGISTRY: git.chemavx.xyz
|
REGISTRY: gitea.gitea.svc.cluster.local:3000
|
||||||
K8S_MANIFESTS_REPO: http://chemavx:${{ secrets.CI_TOKEN }}@gitea.gitea.svc.cluster.local:3000/chemavx/k8s-manifests.git
|
K8S_MANIFESTS_REPO: http://chemavx:${{ secrets.CI_TOKEN }}@gitea.gitea.svc.cluster.local:3000/chemavx/k8s-manifests.git
|
||||||
GIT_SSL_NO_VERIFY: "true"
|
GIT_SSL_NO_VERIFY: "true"
|
||||||
|
|
||||||
@@ -23,17 +23,41 @@ jobs:
|
|||||||
id: tag
|
id: tag
|
||||||
run: echo "TAG=${GITHUB_SHA::8}" >> $GITHUB_OUTPUT
|
run: echo "TAG=${GITHUB_SHA::8}" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
- name: Log in to registry
|
||||||
|
run: echo "${{ secrets.CI_TOKEN }}" | docker login gitea.gitea.svc.cluster.local:3000 -u chemavx --password-stdin
|
||||||
|
|
||||||
|
- name: Create buildx builder
|
||||||
|
run: |
|
||||||
|
cat > /tmp/buildkitd.toml << 'EOF'
|
||||||
|
[registry."registry-cache.registry-cache.svc.cluster.local:5000"]
|
||||||
|
http = true
|
||||||
|
insecure = true
|
||||||
|
|
||||||
|
[registry."gitea.gitea.svc.cluster.local:3000"]
|
||||||
|
http = true
|
||||||
|
insecure = true
|
||||||
|
|
||||||
|
[registry."docker.io"]
|
||||||
|
mirrors = ["registry-cache.registry-cache.svc.cluster.local:5000"]
|
||||||
|
EOF
|
||||||
|
docker buildx create \
|
||||||
|
--name ci-builder \
|
||||||
|
--driver docker-container \
|
||||||
|
--driver-opt network=host \
|
||||||
|
--config /tmp/buildkitd.toml \
|
||||||
|
--use
|
||||||
|
docker buildx inspect --bootstrap
|
||||||
|
|
||||||
- name: Build and push n8n image
|
- name: Build and push n8n image
|
||||||
uses: aevea/action-kaniko@master
|
run: |
|
||||||
with:
|
TAG=${{ steps.tag.outputs.TAG }}
|
||||||
registry: git.chemavx.xyz
|
docker buildx build \
|
||||||
username: chemavx
|
--builder ci-builder \
|
||||||
password: ${{ secrets.CI_TOKEN }}
|
--cache-from type=registry,ref=gitea.gitea.svc.cluster.local:3000/chemavx/n8n:buildcache \
|
||||||
image: chemavx/n8n
|
--cache-to type=registry,ref=gitea.gitea.svc.cluster.local:3000/chemavx/n8n:buildcache,mode=max \
|
||||||
tag: ${{ steps.tag.outputs.TAG }}
|
-t gitea.gitea.svc.cluster.local:3000/chemavx/n8n:${TAG} \
|
||||||
path: .
|
--push \
|
||||||
build_file: Dockerfile
|
-f Dockerfile .
|
||||||
extra_args: --insecure --skip-tls-verify
|
|
||||||
|
|
||||||
- name: Update k8s manifests
|
- name: Update k8s manifests
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
Reference in New Issue
Block a user