dtan/.drone.yml

47 lines
975 B
YAML
Raw Normal View History

2023-11-27 20:00:59 +00:00
kind: pipeline
type: kubernetes
name: docker
concurrency:
limit: 1
trigger:
branch:
- main
event:
- push
metadata:
namespace: git
steps:
- name: Fetch tags
image: alpine/git
commands:
- git fetch --tags
- name: Build site
image: node:current-bullseye
volumes:
- name: cache
path: /cache
environment:
YARN_CACHE_FOLDER: /cache/.yarn-docker
commands:
- yarn install
- yarn build
- name: build docker image
2024-05-16 15:08:20 +00:00
image: docker
2023-11-27 20:00:59 +00:00
privileged: true
volumes:
- name: cache
path: /cache
environment:
TOKEN:
from_secret: docker_hub
commands:
2024-05-16 15:08:20 +00:00
- dockerd &
- docker login -u voidic -p $TOKEN
2024-05-16 15:10:27 +00:00
- docker buildx create --name mybuilder --bootstrap --use
2024-05-16 15:08:20 +00:00
- docker buildx build --push -t voidic/dtan:latest --platform linux/amd64,linux/arm64 .
- kill $(cat /var/run/docker.pid)
2023-11-27 20:00:59 +00:00
volumes:
- name: cache
claim:
2023-11-27 20:03:47 +00:00
name: docker-cache