Clean up build pipeline and make release file names less ugly

This commit is contained in:
ICScaryThings 2022-07-17 19:21:24 -04:00
parent 57ec30b976
commit c7045a4254

View file

@ -10,12 +10,17 @@ platform:
steps:
- name: build
environment:
APIKEY:
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-`git rev-parse HEAD`.tar.gz treebird-latest/ treebird.nginx
- docker save treebird:latest | gzip > release/treebird-latest-`git rev-parse HEAD`.tar.gz
- docker run --rm -e DRONE_BUILD_EVENT=tag -e PLUGIN_BASE_URL=https://git.freecumextremist.com/ -e PLUGIN_API_KEY=$APIKEY -e PLUGIN_FILES=release/* -e DRONE_REPO_OWNER=icscarythings -e DRONE_REPO_NAME=treebird-docker -v $(pwd):$(pwd) -w $(pwd) plugins/gitea-release
- 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