update drone behaviour [CI SKIP]

This commit is contained in:
MrMeeb 2023-05-27 13:40:44 +00:00
parent b3436f3b2c
commit d4aa8ff410

View File

@ -1,22 +1,86 @@
kind: pipeline
type: docker
name: build-multiarch-images
name: build-release-images
trigger:
event:
exclude:
- pull_request
ref:
- refs/tags/**
platform:
os: linux
arch: amd64
steps:
- name: make-tags
# Set tags for main branch - release tag and 'latest'
- name: make-tags-main
image: node
commands:
- echo -n "${DRONE_COMMIT_SHA:0:10}, latest" > .tags
- echo -n "${DRONE_TAG}, latest" > .tags
- name: build
# Build containers from main branch when released
- name: build-main
image: thegeeklab/drone-docker-buildx
privileged: true
settings:
provenance: false
registry: git.mrmeeb.stream
username:
from_secret: docker_username
password:
from_secret: docker_password
repo: git.mrmeeb.stream/mrmeeb/cronicle
platforms:
- linux/arm64
- linux/amd64
- name: release
image: goreleaser/goreleaser
environment:
GITEA_TOKEN:
from_secret: gitea_token
commands:
- goreleaser release
- name: notify
image: plugins/slack
when:
status:
- success
- failure
settings:
webhook:
from_secret: slack_webhook
---
kind: pipeline
type: docker
name: build-develop-images
trigger:
event:
exclude:
- pull_request
branch:
- develop
platform:
os: linux
arch: amd64
steps:
# Set tags for develop branch - git commit SHA and 'develop'
- name: make-tags-develop
image: node
commands:
- echo -n "${DRONE_COMMIT_SHA:0:8}, develop" > .tags
# Build containers from develop branch
- name: build-develop
image: thegeeklab/drone-docker-buildx
privileged: true
settings:
provenance: false
registry: git.mrmeeb.stream
username:
from_secret: docker_username
@ -35,11 +99,4 @@ steps:
- failure
settings:
webhook:
from_secret: slack_webhook
trigger:
branch:
- main
event:
exclude:
- pull_request
from_secret: slack_webhook