chore: cache docker build

This commit is contained in:
2025-06-11 14:48:46 +01:00
parent ec271f4109
commit 2576f75bc4

View File

@ -5,17 +5,24 @@ metadata:
namespace: git namespace: git
concurrency: concurrency:
limit: 1 limit: 1
volumes:
- name: cache
claim:
name: storage2
steps: steps:
- name: build - name: build
image: docker image: docker
privileged: true privileged: true
volumes:
- name: cache
path: /cache
environment: environment:
TOKEN: TOKEN:
from_secret: gitea from_secret: gitea
TOKEN_DOCKER: TOKEN_DOCKER:
from_secret: docker_hub from_secret: docker_hub
commands: commands:
- dockerd & - dockerd --data-root /cache/dockerd &
- docker login -u voidic -p $TOKEN_DOCKER - docker login -u voidic -p $TOKEN_DOCKER
- docker buildx build --push -t voidic/route96:latest . - docker buildx build --push -t voidic/route96:latest .
- kill $(cat /var/run/docker.pid) - kill $(cat /var/run/docker.pid)
@ -30,17 +37,24 @@ trigger:
- tag - tag
metadata: metadata:
namespace: git namespace: git
volumes:
- name: cache
claim:
name: storage2
steps: steps:
- name: build - name: build
image: docker image: docker
privileged: true privileged: true
volumes:
- name: cache
path: /cache
environment: environment:
TOKEN: TOKEN:
from_secret: gitea from_secret: gitea
TOKEN_DOCKER: TOKEN_DOCKER:
from_secret: docker_hub from_secret: docker_hub
commands: commands:
- dockerd & - dockerd --data-root /cache/dockerd &
- docker login -u voidic -p $TOKEN_DOCKER - docker login -u voidic -p $TOKEN_DOCKER
- docker buildx build --push voidic/route96:$DRONE_TAG . - docker buildx build --push voidic/route96:$DRONE_TAG .
- kill $(cat /var/run/docker.pid) - kill $(cat /var/run/docker.pid)