diff options
-rw-r--r-- | .gitlab-ci.yml | 30 |
1 files changed, 30 insertions, 0 deletions
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"' |