2022-06-26 23:53:26 +05:00
|
|
|
---
|
|
|
|
kind: pipeline
|
|
|
|
type: docker
|
|
|
|
name: "lint"
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: lint
|
2022-06-26 23:56:24 +05:00
|
|
|
image: koalaman/shellcheck-alpine:v0.8.0
|
2022-06-26 23:53:26 +05:00
|
|
|
pull: if-not-exists
|
|
|
|
commands:
|
2022-06-26 23:54:52 +05:00
|
|
|
- /bin/shellcheck mirror.sh
|
2022-06-26 23:53:26 +05:00
|
|
|
|
|
|
|
---
|
|
|
|
kind: pipeline
|
|
|
|
type: docker
|
|
|
|
name: "mirror"
|
|
|
|
|
|
|
|
depends_on:
|
|
|
|
- "lint"
|
|
|
|
|
|
|
|
trigger:
|
|
|
|
branch: ["main"]
|
|
|
|
|
|
|
|
steps:
|
2022-06-27 01:22:17 +05:00
|
|
|
- name: "docker"
|
|
|
|
image: "docker:20.10.17-dind"
|
|
|
|
pull: if-not-exists
|
|
|
|
detach: true
|
|
|
|
commands:
|
2022-06-27 01:25:17 +05:00
|
|
|
- /usr/local/bin/dockerd --data-root=/var/lib/docker --host=tcp://0.0.0.0:2375 --tls=false
|
2022-06-27 01:22:17 +05:00
|
|
|
|
2022-06-26 23:53:26 +05:00
|
|
|
- name: "mirror"
|
2022-06-27 01:22:17 +05:00
|
|
|
image: "docker:20.10.17-dind"
|
2022-06-26 23:53:26 +05:00
|
|
|
pull: if-not-exists
|
2022-06-27 00:08:44 +05:00
|
|
|
environment:
|
2022-06-27 01:22:17 +05:00
|
|
|
DOCKER_HOST: tcp://docker:2375
|
2022-06-27 00:10:08 +05:00
|
|
|
REGISTRY_USER: drone
|
2022-06-27 00:10:40 +05:00
|
|
|
REGISTRY_PASSWORD:
|
2022-06-27 00:08:44 +05:00
|
|
|
from_secret: drone_secret
|
2022-06-26 23:53:26 +05:00
|
|
|
commands:
|
2022-06-27 00:03:18 +05:00
|
|
|
- apk add --no-cache bash
|
2022-06-27 00:10:08 +05:00
|
|
|
- ./mirror.sh
|