Files
simple-laravel/.woodpecker/build_release.yml
vista 1c4212f709
All checks were successful
ci/woodpecker/release/build_release/1 Pipeline was successful
ci/woodpecker/release/build_release/2 Pipeline was successful
ci/woodpecker/release/build_release/3 Pipeline was successful
ci/woodpecker/release/build_release/4 Pipeline was successful
health-check and migrate on boot (#25)
add a health check to the container
and option to artisan migrate on boot

Co-authored-by: Ruben Momoa <ruben.lobbes@lobbes.nl>
Reviewed-on: #25
2024-08-30 14:29:44 +02:00

54 lines
1.6 KiB
YAML

matrix:
PHP_VERSION:
- 8.1
- 8.2
- 8.3
- 8
when:
branch:
include: [ master ]
cron: nightly
event: [ cron, release, manual ]
clone:
git:
image: woodpeckerci/plugin-git
settings:
partial: true
tags: true
steps:
cron_pre_check:
image: docker
commands:
- docker pull php:${PHP_VERSION}-fpm-alpine
- docker pull vistanarvas/simple-laravel:latest-php-${PHP_VERSION}
- BASE_IMG=$(docker inspect php:${PHP_VERSION}-fpm-alpine --format='{{.Created}}' | cut -d '.' -f 1)
- PREV_IMG=$(docker inspect vistanarvas/simple-laravel:latest-php-${PHP_VERSION} --format='{{.Created}}' | cut -d '.' -f 1)
- BASE_DATE=$(date -D "%Y-%m-%dT%H:%M:%S" -d "$BASE_IMG" +%s)
- PREV_DATE=$(date -D "%Y-%m-%dT%H:%M:%S" -d "$PREV_IMG" +%s)
- if [ "$PREV_DATE" -gt "$BASE_DATE" ]; then echo "no rebuild needed"; exit 1; fi
volumes:
- /var/run/docker.sock:/var/run/docker.sock
when:
cron: nightly
event: [ cron ]
gen_tags:
image: docker
commands:
- ./gen-tag-list.sh $(git describe --tags --abbrev=0) php-${PHP_VERSION}
- cat tags.txt
release_alpine_build_and_publish:
image: woodpeckerci/plugin-docker-buildx
settings:
username: vistanarvas
password:
from_secret: DOCKERHUB_TOKEN
context: ./build
repo: vistanarvas/${CI_REPO_NAME}
tags_file: tags.txt
build_args:
- BASE_VERSION=${PHP_VERSION}