Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 92f3da345b | |||
| 92aa1c3edc | |||
| ac56acf136 | |||
| 23a12aa026 | |||
| 6160593395 | |||
| 77decc49f5 |
-34
@@ -1,34 +0,0 @@
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: default
|
||||
|
||||
trigger:
|
||||
branch:
|
||||
- master
|
||||
|
||||
steps:
|
||||
- name: build
|
||||
image: almalinux:8.10
|
||||
commands:
|
||||
# Remove default repos
|
||||
- rm -rf /etc/yum.repos.d/*.repo
|
||||
|
||||
# Add edgecache repos
|
||||
- echo -e "[epel]\nname=epel repository\nbaseurl=http://edgecache.query.consul/epel/8/Everything/x86_64\ngpgkey=http://edgecache.query.consul/epel/RPM-GPG-KEY-EPEL-8\nenabled=1\ngpgcheck=1" > /etc/yum.repos.d/epel.repo
|
||||
- echo -e "[baseos]\nname=baseos repository\nbaseurl=http://edgecache.query.consul/almalinux/8.10/BaseOS/x86_64/os\ngpgkey=http://edgecache.query.consul/almalinux/RPM-GPG-KEY-AlmaLinux-8\nenabled=1\ngpgcheck=1" > /etc/yum.repos.d/baseos.repo
|
||||
- echo -e "[appstream]\nname=appstream repository\nbaseurl=http://edgecache.query.consul/almalinux/8.10/AppStream/x86_64/os\ngpgkey=http://edgecache.query.consul/almalinux/RPM-GPG-KEY-AlmaLinux-8\nenabled=1\ngpgcheck=1" > /etc/yum.repos.d/appstream.repo
|
||||
- echo -e "[powertools]\nname=powertools repository\nbaseurl=http://edgecache.query.consul/almalinux/8.10/PowerTools/x86_64/os\ngpgkey=http://edgecache.query.consul/almalinux/RPM-GPG-KEY-AlmaLinux-8\nenabled=1\ngpgcheck=1" > /etc/yum.repos.d/powertools.repo
|
||||
|
||||
# Clean and update repository cache
|
||||
- dnf clean all
|
||||
- dnf makecache
|
||||
|
||||
# Install RPMFusion
|
||||
- dnf install -y --nogpgcheck https://mirrors.rpmfusion.org/free/el/rpmfusion-free-release-$(rpm -E %rhel).noarch.rpm
|
||||
- dnf install -y --nogpgcheck https://mirrors.rpmfusion.org/nonfree/el/rpmfusion-nonfree-release-$(rpm -E %rhel).noarch.rpm
|
||||
|
||||
# Install the required packages using custom repositories
|
||||
- dnf install -y golang gcc gcc-c++ make git sqlite-devel taglib-devel ffmpeg mpv rpmdevtools wget systemd sqlite taglib
|
||||
|
||||
# Run the `make` command
|
||||
- make
|
||||
@@ -0,0 +1,47 @@
|
||||
name: Build and Upload RPMs
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build on AlmaLinux 8
|
||||
runs-on: almalinux8
|
||||
container:
|
||||
image: git.query.consul/unkin/almalinux8:latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Install RPMFusion
|
||||
run: |
|
||||
dnf install -y --nogpgcheck https://mirrors.rpmfusion.org/free/el/rpmfusion-free-release-$(rpm -E %rhel).noarch.rpm
|
||||
dnf install -y --nogpgcheck https://mirrors.rpmfusion.org/nonfree/el/rpmfusion-nonfree-release-$(rpm -E %rhel).noarch.rpm
|
||||
|
||||
- name: Install required packages
|
||||
run: |
|
||||
dnf install -y golang gcc gcc-c++ make git sqlite-devel taglib-devel ffmpeg mpv rpmdevtools wget systemd sqlite taglib
|
||||
|
||||
- name: Build project
|
||||
run: make build
|
||||
|
||||
upload:
|
||||
name: Upload RPMs
|
||||
runs-on: almalinux8
|
||||
needs: build
|
||||
container:
|
||||
image: git.query.consul/unkin/almalinux8:latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Upload RPMs to Gitea
|
||||
env:
|
||||
DRONECI_PASSWORD: ${{ secrets.DRONECI_PASSWORD }}
|
||||
run: |
|
||||
for rpm in /drone/src/rpmbuild/RPMS/*/*.rpm; do
|
||||
curl --user droneci:${{ secrets.DRONECI_PASSWORD }} --upload-file $rpm https://git.query.consul/api/packages/unkin/rpm/almalinux/el8/upload
|
||||
done
|
||||
@@ -1,6 +1,6 @@
|
||||
.PHONY: all prep download build clean
|
||||
|
||||
RPMBUILD := $(HOME)/rpmbuild
|
||||
RPMBUILD := /drone/src/rpmbuild
|
||||
SOURCES := $(RPMBUILD)/SOURCES
|
||||
SPECS := $(RPMBUILD)/SPECS
|
||||
SPECFILE := gonic.spec
|
||||
@@ -23,7 +23,7 @@ download: prep
|
||||
|
||||
build: $(SPECFILE) download
|
||||
@echo "Building RPM..."
|
||||
@rpmbuild -ba $(SPECFILE)
|
||||
@rpmbuild -ba --define "_topdir $(RPMBUILD)" $(SPECFILE)
|
||||
@echo "RPM built."
|
||||
|
||||
clean:
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@ Requires: golang, git, sqlite, taglib, ffmpeg, mpv, systemd
|
||||
%description
|
||||
Gonic is a lightweight music streaming server written in Go.
|
||||
|
||||
%global debug_package %{nil}
|
||||
%global debug_package %{nil}
|
||||
|
||||
%prep
|
||||
%autosetup -n %{name}-%{version}
|
||||
|
||||
Reference in New Issue
Block a user