blog.lazkani.io/.drone.yml
Elia el Lazkani e28a8c9d35
All checks were successful
continuous-integration/drone Build is passing
continuous-integration/drone/promote/production Build is passing
chore(): Building blog container for deployment
2023-07-01 17:47:58 +02:00

62 lines
1.1 KiB
YAML

---
kind: pipeline
name: default
clone:
depth: 1
steps:
- name: update-submodules
image: alpine/git
commands:
- git submodule update --init --recursive
- name: generate-blog
image: plugins/hugo
settings:
hugo_version: 0.84.4
validate: true
pull: always
- name: clean-up-images
image: alpine
commands:
- rm -rf public/images/*
- name: test-build-container
image: plugins/docker
settings:
registry: scm.project42.io
username:
from_secret: registry_username
password:
from_secret: registry_password
repo: scm.project42.io/elia/blog
dry_run: true
squash: true
tags:
- "${DRONE_COMMIT_SHA:0:8}"
when:
event:
exclude:
- tag
- name: build-container
image: plugins/docker
settings:
registry: scm.project42.io
username:
from_secret: registry_username
password:
from_secret: registry_password
repo: scm.project42.io/elia/blog
dry_run: false
squash: true
tags:
- latest
- "${DRONE_COMMIT_SHA:0:8}"
when:
event:
- promote
target:
- production