2022-12-08 18:49:51 +00:00
|
|
|
# 345678911234567892123456789312345678941234567895123456789612345678971234567898
|
|
|
|
kind: pipeline
|
|
|
|
name: build-and-upload
|
|
|
|
|
|
|
|
steps:
|
2022-12-08 20:22:03 +00:00
|
|
|
- name: send-tags-to-tags-file
|
|
|
|
image: alpine
|
|
|
|
when:
|
|
|
|
event:
|
|
|
|
- push
|
|
|
|
- pull_request
|
|
|
|
commands:
|
|
|
|
- echo -n "latest, $(date +'%Y-%m-%d'), ${DRONE_COMMIT_SHA:0:7}, ${DRONE_COMMIT_SHA}, ${DRONE_BRANCH}" > .tags
|
2022-12-08 19:43:43 +00:00
|
|
|
- name: build-and-push
|
|
|
|
image: plugins/docker
|
|
|
|
environment:
|
|
|
|
DOCKER_BUILDKIT: 1
|
2022-12-08 19:50:38 +00:00
|
|
|
network_mode: bridge
|
2022-12-08 19:43:43 +00:00
|
|
|
settings:
|
|
|
|
repo: sneak/builder
|
2022-12-08 20:22:03 +00:00
|
|
|
force_tag: true
|
2022-12-08 19:43:43 +00:00
|
|
|
username:
|
|
|
|
from_secret: DOCKER_USERNAME
|
|
|
|
password:
|
|
|
|
from_secret: DOCKER_TOKEN
|
|
|
|
- name: notify
|
|
|
|
image: plugins/slack
|
|
|
|
settings:
|
|
|
|
webhook:
|
|
|
|
from_secret: SLACK_WEBHOOK_URL
|
|
|
|
when:
|
|
|
|
event: pull_request
|