49 lines
1.7 KiB
YAML
49 lines
1.7 KiB
YAML
on:
|
|
workflow_call:
|
|
inputs:
|
|
cpu:
|
|
required: true
|
|
type: string
|
|
|
|
jobs:
|
|
build-openbsd-${{ inputs.cpu }}:
|
|
name: OpenBSD ${{ inputs.cpu }}
|
|
runs-on: openbsd
|
|
env:
|
|
PORTSDIR: ${{ forgejo.workspace }}/ports
|
|
CPUTYPE: ${{ inputs.cpu }}
|
|
FLAVORS: ${{ inputs.cpu }}
|
|
FLAVOR: ${{ inputs.cpu }}
|
|
steps:
|
|
- name: Clone
|
|
run: |
|
|
git clone --quiet -c http.extraHeader="Authorization: token ${{ forgejo.token }}" --revision ${{ forgejo.sha }} ${{ forgejo.server_url }}/${{ forgejo.repository }} continuwuity-bsd
|
|
|
|
- name: Prepare ports tree
|
|
run: |
|
|
git clone --quiet --depth 1 --filter=blob:none --sparse -c http.extraHeader="Authorization: token ${{ forgejo.token }}" https://code.kat5.dev/mirrors/openbsd-ports ports
|
|
cd ports
|
|
git sparse-checkout set archivers/bzip2/ infrastructure/
|
|
mkdir -p net/continuwuity
|
|
cp -R ${{ forgejo.workspace }}/continuwuity-bsd/openbsd/* net/continuwuity
|
|
patch infrastructure/db/user.list < net/continuwuity/user.list.patch
|
|
|
|
- name: Build
|
|
id: build
|
|
run: |
|
|
cd ports/net/continuwuity
|
|
echo "fullpkgname=$(make _print-packagename)" | tee $FORGEJO_OUTPUT
|
|
make
|
|
|
|
- name: Package
|
|
run: |
|
|
cd ports/net/continuwuity
|
|
make package
|
|
mv ${{ forgejo.workspace}}/ports/packages/amd64/ftp/${{ steps.build.outputs.fullpkgname }}.tgz ${{ steps.build.outputs.fullpkgname}}-openbsd79-amd64-${{ inputs.cpu }}.tgz
|
|
|
|
- name: Upload package
|
|
uses: https://data.forgejo.org/forgejo/upload-artifact@v4
|
|
with:
|
|
name: openbsd-${{ inputs.cpu }}
|
|
path: "ports/net/continuwuity/*.tgz"
|
|
compression-level: 0
|