From 665170f086995ec85b47b9c562700a41293236a0 Mon Sep 17 00:00:00 2001 From: Daniel Weipert Date: Sat, 3 Jul 2021 12:56:19 +0200 Subject: Adds CI package build --- .gitlab-ci.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..14f203f --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,30 @@ +cache: + key: $CI_COMMIT_REF_NAME + paths: + - vendor + +build: + stage: build + image: edbizarro/gitlab-ci-pipeline-php:8.0-alpine + only: + - main + + script: + - composer install --prefer-dist --no-ansi --no-interaction --no-progress + - ./bin/build.php + + artifacts: + paths: + - build/docker-compose.yml + +deploy: + stage: deploy + image: curlimages/curl:latest + needs: + - job: build + artifacts: true + only: + - main + + script: + - 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file build/docker-compose.yml "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/docker-compose.yml/$(date +"%Y-%m-%d").$CI_COMMIT_SHORT_SHA/docker-compose.yml"' -- cgit v1.2.3