generate Debian packages

This commit is contained in:
eyedeekay
2025-05-21 17:16:15 -04:00
parent 9feb5d2895
commit 45a461d669
3 changed files with 114 additions and 4 deletions

55
.github/workflows/gitea-debian.yml vendored Normal file
View File

@ -0,0 +1,55 @@
# Uses the stable build of Gitea to create a Debian package with pkginstall
# Triggered an hour after the Gitea stable build
# Runs on Ubuntu 22.04
name: Gitea Nightly Debian Build
on:
push: # Run on any push
schedule:
- cron: '0 1 * * *' # Runs daily at 1 UTC
workflow_dispatch: # Allow manual triggers
permissions:
contents: write # Required for creating releases
jobs:
build:
strategy:
matrix:
os: [ubuntu-22.04]
runs-on: ${{ matrix.os }}
timeout-minutes: 120 # 2-hour timeout
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.24.3'
cache: true
- name: Get version
id: get_version
run: |
if [[ $GITHUB_REF == refs/tags/* ]]; then
VERSION=${GITHUB_REF#refs/tags/v}
else
VERSION=0.0.1-$(git rev-parse --short HEAD)
fi
echo "version=$VERSION" >> $GITHUB_OUTPUT
- name: Sleep for 15 minutes
run: sleep 900
- name: Generate pkg contents in "/build"
run: |
BASE=build make install
./pkginstall build \
--name go-gitlooseleaf \
--version ${{ steps.get_version.outputs.version }} \
--maintainer "idk <idk@i2pmail.org>" \
--description "A modded gitea for hidden services" \
--source ./build \
--verbose

View File

@ -0,0 +1,55 @@
# Uses the nightly build of Gitea to create a Debian package with pkginstall
# Triggered an hour after the Gitea nightly build
# Runs on Ubuntu 22.04
name: Gitea Nightly Debian Build
on:
push: # Run on any push
schedule:
- cron: '0 1 * * *' # Runs daily at 1 UTC
workflow_dispatch: # Allow manual triggers
permissions:
contents: write # Required for creating releases
jobs:
build:
strategy:
matrix:
os: [ubuntu-22.04]
runs-on: ${{ matrix.os }}
timeout-minutes: 120 # 2-hour timeout
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.24.3'
cache: true
- name: Get version
id: get_version
run: |
if [[ $GITHUB_REF == refs/tags/* ]]; then
VERSION=${GITHUB_REF#refs/tags/v}
else
VERSION=0.0.1-$(git rev-parse --short HEAD)
fi
echo "version=$VERSION" >> $GITHUB_OUTPUT
- name: Sleep for 15 minutes
run: sleep 900
- name: Generate pkg contents in "/build"
run: |
BASE=build make install
./pkginstall build \
--name go-gitlooseleaf \
--version ${{ steps.get_version.outputs.version }} \
--maintainer "idk <idk@i2pmail.org>" \
--description "A modded gitea for hidden services" \
--source ./build \
--verbose

View File

@ -1,10 +1,10 @@
.PHONY: all download setup-user install-binary install-systemd enable disable uninstall clean help
# Installation paths
BINARY_PATH = /usr/local/bin/gitea
SYSTEMD_PATH = /etc/systemd/system
CONFIG_PATH = /etc/gitea
DATA_PATH = /var/lib/gitea
BINARY_PATH = ${BASE}/usr/local/bin/gitea
SYSTEMD_PATH = ${BASE}/etc/systemd/system
CONFIG_PATH = ${BASE}/etc/gitea
DATA_PATH = ${BASE}/var/lib/gitea
# Default target
all: help