dgd-backupper-php/.drone.yml

60 lines
1.4 KiB
YAML

kind: pipeline
name: default
type: docker
steps:
- name: composer
pull: if-not-exists
image: composer
commands:
- composer install --prefer-dist
#
# - name: test
# image: lorisleiva/laravel-docker
# commands:
# - ./vendor/bin/phpunit
#
# - name: github
# image: alpine/git
# environment:
# SSH_KEY:
# from_secret: id_rsa
# SSH_KEY_PUB:
# from_secret: id_rsa_pub
# commands:
# - mkdir ~/.ssh
# - echo "$SSH_KEY" | tr -d '\r' > ~/.ssh/id_rsa
# - echo "$SSH_KEY_PUB" | tr -d '\r' > ~/.ssh/id_rsa.pub
# - chmod 755 ~/.ssh
# - chmod 600 ~/.ssh/id_rsa
# - chmod 600 ~/.ssh/id_rsa.pub
# - eval $(ssh-agent)
# - ssh-add ~/.ssh/id_rsa
# - ssh-keyscan -H 'github.com' >> ~/.ssh/known_hosts
# - git remote add github git@github.com:muhep06/dgd-backupper-php.git
# - git push github master -f
- name: build
image: lorisleiva/laravel-docker
environment:
BUILD_VERSION: "1.0.1-pre"
commands:
- composer global require humbug/box
- echo php backupper app:build --build-version=$BUILD_VERSION -n >> build.sh
- chmod +x ./build.sh
- ./build.sh
- php builds/backupper
- name: publish
image: plugins/github-release
environment:
BUILD_VERSION: "1.0.1-pre"
settings:
api_key:
from_secret: api_key
files:
- builds/*
title: $BUILD_VERSION
when:
event: tag