feat: add deploy steps
Some checks failed
continuous-integration/drone/push Build is failing

- add deployment steps to droneci
This commit is contained in:
Ben Vincent 2024-08-25 15:12:08 +10:00
parent 77decc49f5
commit baa87d06f3
2 changed files with 23 additions and 5 deletions

View File

@ -3,11 +3,13 @@ type: docker
name: default name: default
trigger: trigger:
branch: event:
- master include:
- push
- pull_request
steps: steps:
- name: build - name: build_el8
image: almalinux:8.10 image: almalinux:8.10
commands: commands:
# Remove default repos # Remove default repos
@ -31,4 +33,20 @@ steps:
- dnf install -y golang gcc gcc-c++ make git sqlite-devel taglib-devel ffmpeg mpv rpmdevtools wget systemd sqlite taglib - dnf install -y golang gcc gcc-c++ make git sqlite-devel taglib-devel ffmpeg mpv rpmdevtools wget systemd sqlite taglib
# Run the `make` command # Run the `make` command
- make - make build
- name: upload_el8
image: curlimages/curl:latest
environment:
GITEA_TOKEN:
from_secret: gitea_package_token
commands:
- >
for rpm in /drone/src/rpmbuild/RPMS/*/*.rpm; do
curl --user droneci:${GITEA_TOKEN} --upload-file $rpm https://git.query.consul/api/v1/packages/unkin/rpm/almalinux/el8/upload
done
when:
branch:
- master
event:
- push

View File

@ -1,6 +1,6 @@
.PHONY: all prep download build clean .PHONY: all prep download build clean
RPMBUILD := $(HOME)/rpmbuild RPMBUILD := /drone/src/rpmbuild
SOURCES := $(RPMBUILD)/SOURCES SOURCES := $(RPMBUILD)/SOURCES
SPECS := $(RPMBUILD)/SPECS SPECS := $(RPMBUILD)/SPECS
SPECFILE := gonic.spec SPECFILE := gonic.spec