mirror of
https://github.com/go-i2p/go-gitlooseleaf.git
synced 2025-12-01 09:54:59 -05:00
86 lines
2.4 KiB
YAML
86 lines
2.4 KiB
YAML
# 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
|
|
|
|
- name: Upload Build Artifact
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
path: "*.deb"
|
|
name: gitea-debian-${{ steps.get_version.outputs.version }}.deb
|
|
|
|
release:
|
|
needs: build
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Download All Artifacts
|
|
uses: actions/download-artifact@v4
|
|
|
|
- name: Get Current Date
|
|
id: date
|
|
run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
|
|
|
|
# - name: Update Release
|
|
# uses: softprops/action-gh-release@v2
|
|
# with:
|
|
# tag_name: ${{ needs.check-release.outputs.new_tag }}
|
|
# name: "Gitea ${{ needs.check-release.outputs.new_tag }}"
|
|
# body: "Automated build of Gitea ${{ needs.check-release.outputs.new_tag }}"
|
|
# files: "*.deb"
|
|
# draft: false
|
|
# prerelease: false
|
|
# allowUpdates: true
|
|
# removeArtifacts: false
|
|
# replacesArtifacts: true
|