treebird-docker/.drone.yml

26 lines
904 B
YAML

---
kind: pipeline
type: exec
name: default
platform:
os: linux
arch: amd64
steps:
- name: build
environment:
DRONE_BUILD_EVENT: tag
PLUGIN_BASE_URL: https://git.freecumextremist.com/
PLUGIN_API_KEY:
from_secret: release_api_key
PLUGIN_FILES: release/*
DRONE_REPO_OWNER: icscarythings
DRONE_REPO_NAME: treebird-docker
commands:
- ./build_container.sh
- mkdir release/
- rm -v treebird-latest/treebird
- tar -czf release/treebird-static-files-latest-`date +%Y-%m-%d-T%H%M%S`-`git rev-parse --short HEAD`.tar.gz treebird-latest/ treebird.nginx
- docker save treebird:latest | gzip > release/treebird-latest-amd64-`date +%Y-%m-%d-T%H%M%S`-`git rev-parse --short HEAD`.tar.gz
- docker run --rm -e DRONE_BUILD_EVENT -e PLUGIN_BASE_URL -e PLUGIN_API_KEY -e PLUGIN_FILES -e DRONE_REPO_OWNER -e DRONE_REPO_NAME -v $(pwd):$(pwd) -w $(pwd) plugins/gitea-release