Another drone optimization
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
21
.drone.yml
21
.drone.yml
@@ -7,21 +7,24 @@ volumes:
|
|||||||
host:
|
host:
|
||||||
path: /var/run/docker.sock
|
path: /var/run/docker.sock
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: docker-build
|
- name: docker-build
|
||||||
image: docker:24
|
image: docker:24
|
||||||
volumes:
|
volumes:
|
||||||
- name: dockersock
|
- name: dockersock
|
||||||
path: /var/run/docker.sock
|
path: /var/run/docker.sock
|
||||||
environment:
|
|
||||||
GITEA_USERNAME:
|
|
||||||
from_secret: gitea_username
|
|
||||||
GITEA_TOKEN:
|
|
||||||
from_secret: gitea_token
|
|
||||||
commands:
|
commands:
|
||||||
- docker buildx create --use || true
|
- export DOCKER_BUILDKIT=1
|
||||||
- docker login 192.168.1.9:3000 -u $GITEA_USERNAME -p $GITEA_TOKEN
|
- docker buildx create --use --driver docker-container || true
|
||||||
- docker buildx build --tag 192.168.1.9:3000/tai/aberwyn/aberwyn:latest --tag 192.168.1.9:3000/tai/aberwyn/aberwyn:${DRONE_COMMIT_SHA:0:7} --cache-from=type=registry,ref=192.168.1.9:3000/tai/aberwyn/aberwyn:buildcache --cache-to=type=registry,ref=192.168.1.9:3000/tai/aberwyn/aberwyn:buildcache,mode=max --push -f Aberwyn/Dockerfile .
|
- docker login 192.168.1.9:3000 -u ${GITEA_USERNAME} -p ${GITEA_TOKEN}
|
||||||
|
- docker buildx build \
|
||||||
|
--tag 192.168.1.9:3000/tai/aberwyn/aberwyn:latest \
|
||||||
|
--tag 192.168.1.9:3000/tai/aberwyn/aberwyn:${DRONE_COMMIT_SHA:0:7} \
|
||||||
|
--cache-from=type=registry,ref=192.168.1.9:3000/tai/aberwyn/aberwyn:buildcache \
|
||||||
|
--cache-to=type=registry,ref=192.168.1.9:3000/tai/aberwyn/aberwyn:buildcache,mode=max \
|
||||||
|
--push \
|
||||||
|
--builder default \
|
||||||
|
--allow insecure \
|
||||||
|
-f Aberwyn/Dockerfile .
|
||||||
|
|
||||||
- name: restart-unraid-container
|
- name: restart-unraid-container
|
||||||
image: appleboy/drone-ssh
|
image: appleboy/drone-ssh
|
||||||
|
|||||||
Reference in New Issue
Block a user