tweak build behaviour [CI SKIP]
This commit is contained in:
parent
f990871798
commit
1ac78908ad
40
.drone.yml
40
.drone.yml
@ -1,11 +1,12 @@
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: build-release-images
|
||||
name: build-main-images
|
||||
trigger:
|
||||
event:
|
||||
exclude:
|
||||
- pull_request
|
||||
ref:
|
||||
- refs/heads/main
|
||||
- refs/tags/**
|
||||
|
||||
platform:
|
||||
@ -13,14 +14,34 @@ platform:
|
||||
arch: amd64
|
||||
|
||||
steps:
|
||||
# Set tags for main branch - release tag and 'latest'
|
||||
- name: make-tags-main
|
||||
|
||||
- name: get-tags
|
||||
image: docker:git
|
||||
commands:
|
||||
- git fetch --tags
|
||||
when:
|
||||
ref:
|
||||
- refs/tags/**
|
||||
|
||||
# Set tags for main branch
|
||||
- name: make-tags
|
||||
image: node
|
||||
commands:
|
||||
- echo -n "${DRONE_COMMIT_SHA:0:8}, latest" > .tags
|
||||
when:
|
||||
ref:
|
||||
- refs/heads/main
|
||||
|
||||
- name: make-tags-release
|
||||
image: node
|
||||
commands:
|
||||
- echo -n "${DRONE_TAG}, latest" > .tags
|
||||
when:
|
||||
ref:
|
||||
- refs/tags/**
|
||||
|
||||
# Build containers from main branch when released
|
||||
- name: build-main
|
||||
# Build containers from main branch
|
||||
- name: build
|
||||
image: thegeeklab/drone-docker-buildx
|
||||
privileged: true
|
||||
settings:
|
||||
@ -42,6 +63,9 @@ steps:
|
||||
from_secret: gitea_token
|
||||
commands:
|
||||
- goreleaser release
|
||||
when:
|
||||
ref:
|
||||
- refs/tags/**
|
||||
|
||||
- name: notify
|
||||
image: plugins/slack
|
||||
@ -70,13 +94,13 @@ platform:
|
||||
|
||||
steps:
|
||||
# Set tags for develop branch - git commit SHA and 'develop'
|
||||
- name: make-tags-develop
|
||||
- name: make-tags
|
||||
image: node
|
||||
commands:
|
||||
- echo -n "${DRONE_COMMIT_SHA:0:8}, develop" > .tags
|
||||
- echo -n "develop-${DRONE_COMMIT_SHA:0:8}, develop" > .tags
|
||||
|
||||
# Build containers from develop branch
|
||||
- name: build-develop
|
||||
- name: build
|
||||
image: thegeeklab/drone-docker-buildx
|
||||
privileged: true
|
||||
settings:
|
||||
|
Loading…
x
Reference in New Issue
Block a user