好哦是自动部署
Some checks reported errors
continuous-integration/drone/push Build encountered an error

This commit is contained in:
2025-06-10 04:04:29 +09:00
parent 08a16e3087
commit c728412a3f
2 changed files with 35 additions and 4 deletions

View File

@ -3,8 +3,35 @@ type: docker
name: default name: default
steps: steps:
- name: greeting - name: 打包 Docker 容器
image: alpine image: docker:latest
privileged: true
environment:
DOCKER_TAG: ${DRONE_COMMIT_SHA:0:8}
DOCKER_USERNAME:
from_secret: DOCKER_USERNAME
DOCKER_PASSWORD:
from_secret: DOCKER_PASSWORD
DOCKER_REGISTRY: gitea.service.jazzwhom.top
commands: commands:
- echo hello - echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin "$DOCKER_REGISTRY"
- echo world - docker build -t "$DOCKER_REGISTRY/your-org/your-app:$DOCKER_TAG" .
- docker build -t "$DOCKER_REGISTRY/your-org/your-app:latest" .
- docker push "$DOCKER_REGISTRY/your-org/your-app:$DOCKER_TAG"
- docker push "$DOCKER_REGISTRY/your-org/your-app:latest"
- name: 清理累赘的 Docker 镜像
image: docker:latest
privileged: true
commands:
- docker rmi "$DOCKER_REGISTRY/your-org/your-app:$DOCKER_TAG"
- docker rmi "$DOCKER_REGISTRY/your-org/your-app:latest"
when:
status:
- success
- failure
trigger:
event:
- push

View File

@ -1 +1,5 @@
喵——帕 喵——帕
20250610 追加:恭喜你成功安装了 Docker 并运行了这个镜像!请根据内部文档继续操作吧!
(如果没有文档说明我还没写)