diff options
author | Daniel Weipert <code@drogueronin.de> | 2021-07-03 12:56:19 +0200 |
---|---|---|
committer | Daniel Weipert <code@drogueronin.de> | 2021-07-03 12:58:41 +0200 |
commit | 665170f086995ec85b47b9c562700a41293236a0 (patch) | |
tree | 842f011bdf98dbf37a0f7d7b0ecd21caee84d848 | |
parent | 11bfd45124f55a79c71ef10008c8b1cfdffa6a24 (diff) |
Adds CI package build
-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"' |