Update .drone.yml
parent
aeff1afdb7
commit
be09ad70d9
56
.drone.yml
56
.drone.yml
|
|
@ -2,6 +2,9 @@ kind: pipeline
|
|||
name: default
|
||||
type: docker
|
||||
|
||||
clone:
|
||||
tags: true
|
||||
|
||||
steps:
|
||||
- name: composer
|
||||
pull: if-not-exists
|
||||
|
|
@ -9,8 +12,59 @@ steps:
|
|||
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 clone https://git.muhepatasoy.xyz/muhep/dgd-backupper-php
|
||||
- cd dgd-backupper-php
|
||||
- git pull origin master --tags
|
||||
- git remote add upstream git@github.com:muhep06/dgd-backupper-php.git
|
||||
- git push upstream master
|
||||
- git push upstream master --tags
|
||||
when:
|
||||
event: tag
|
||||
|
||||
- name: build
|
||||
image: lorisleiva/laravel-docker
|
||||
commands:
|
||||
- composer global require humbug/box
|
||||
- git pull origin master --tags
|
||||
- php backupper app:build --build-version=$(git describe --abbrev=0 --tags) -n
|
||||
- php builds/backupper
|
||||
when:
|
||||
event: tag
|
||||
|
||||
- name: publish
|
||||
image: lorisleiva/laravel-docker
|
||||
environment:
|
||||
GITHUB_TOKEN:
|
||||
from_secret: api_key
|
||||
commands:
|
||||
- git pull origin master --tags
|
||||
- wget https://github.com/aktau/github-release/releases/download/v0.7.2/linux-amd64-github-release.tar.bz2
|
||||
- tar xjf linux-amd64-github-release.tar.bz2
|
||||
- chmod +x ./bin/linux/amd64/github-release
|
||||
- mv ./bin/linux/amd64/github-release .
|
||||
- ./github-release release --user muhep06 --repo dgd-backupper-php --tag $(git describe --abbrev=0 --tags) --name "$(git describe --abbrev=0 --tags)"
|
||||
- ./github-release upload --user muhep06 --repo dgd-backupper-php --tag $(git describe --abbrev=0 --tags) --name "backupper" --file ./builds/backupper
|
||||
when:
|
||||
event: tag
|
||||
|
|
|
|||
Loading…
Reference in New Issue