From eb8031931391e2c624aad4bd65eaf46f6b0fe214 Mon Sep 17 00:00:00 2001 From: Simon Vieille Date: Wed, 1 Feb 2023 17:40:08 +0100 Subject: [PATCH] update ci conf --- .woodpecker.yml => .woodpecker/.build.yml | 2 +- .woodpecker/.cron.yml | 40 +++++++++++++++++++++++ 2 files changed, 41 insertions(+), 1 deletion(-) rename .woodpecker.yml => .woodpecker/.build.yml (96%) create mode 100644 .woodpecker/.cron.yml diff --git a/.woodpecker.yml b/.woodpecker/.build.yml similarity index 96% rename from .woodpecker.yml rename to .woodpecker/.build.yml index 4827f11..6d6b437 100644 --- a/.woodpecker.yml +++ b/.woodpecker/.build.yml @@ -34,4 +34,4 @@ pipeline: from_secret: mail_from subject: "[{{ repo.owner }}/{{ repo.name }}] Pipeline #{{ build.number }}: {{ build.status }}" when: - - status: [success, failure] + status: [success, failure] diff --git a/.woodpecker/.cron.yml b/.woodpecker/.cron.yml new file mode 100644 index 0000000..a7b54e7 --- /dev/null +++ b/.woodpecker/.cron.yml @@ -0,0 +1,40 @@ +matrix: + PHP_VERSION: + - 8.2 + - 8.1 + - 8.0 + - 7.4 + - 7.3 + - 7.1 + +pipeline: + docker: + image: docker:dind + secrets: [registry_user, registry_password, registry_docker_password] + commands: + - echo "$REGISTRY_PASSWORD" | docker login -u "$REGISTRY_USER" --password-stdin gitnet.fr + - echo "$REGISTRY_DOCKER_PASSWORD" | docker login -u "$REGISTRY_USER" --password-stdin + - docker build -t "deblan/php:$PHP_VERSION" -f "./Dockerfile.php$PHP_VERSION" . + - docker tag "deblan/php:$PHP_VERSION" "gitnet.fr/deblan/php:$PHP_VERSION" + - docker push "gitnet.fr/deblan/php:$PHP_VERSION" + - docker push "deblan/php:$PHP_VERSION" + volumes: + - /var/run/docker.sock:/var/run/docker.sock + when: + event: cron + + mail: + image: deblan/woodpecker-email + settings: + host: + from_secret: mail_host + username: + from_secret: mail_username + password: + from_secret: mail_password + from: + from_secret: mail_from + subject: "[{{ repo.owner }}/{{ repo.name }}] Pipeline #{{ build.number }}: {{ build.status }}" + when: + event: cron + status: [success, failure]