ci: switch to forgejo debian registry
Signed-off-by: Christoph Heiss <christoph.heiss@robo4you.at>
This commit is contained in:
parent
e4caf2969f
commit
e48e30823a
7 changed files with 274 additions and 297 deletions
91
.forgejo/workflows/python-logstash-async.yaml
Normal file
91
.forgejo/workflows/python-logstash-async.yaml
Normal file
|
@ -0,0 +1,91 @@
|
|||
---
|
||||
name: python3-logstash-async
|
||||
|
||||
on:
|
||||
push:
|
||||
# branches:
|
||||
# - master
|
||||
paths:
|
||||
- .forgejo/workflows/python-logstash-async.yaml
|
||||
pull_request:
|
||||
paths:
|
||||
- .forgejo/workflows/python-logstash-async.yaml
|
||||
|
||||
env:
|
||||
PKGNAME: python3-logstash-async
|
||||
UPSTREAM_VER: '3.0.0'
|
||||
EXTRA_VER: compair2
|
||||
|
||||
jobs:
|
||||
build-deb:
|
||||
runs-on: node-24
|
||||
|
||||
steps:
|
||||
- name: Checkout python-logstash-async
|
||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
with:
|
||||
repository: eht16/python-logstash-async
|
||||
ref: '${{ env.UPSTREAM_VER }}'
|
||||
|
||||
- name: Install prerequisites
|
||||
run: |
|
||||
apt update
|
||||
apt install -y ruby python3-setuptools
|
||||
gem install fpm
|
||||
|
||||
- name: Build package
|
||||
env:
|
||||
PYTHONDONTWRITEBYTECODE: '1'
|
||||
run: |
|
||||
fpm -s python \
|
||||
--verbose \
|
||||
--python-bin python3 \
|
||||
--python-pip pip3 \
|
||||
--python-package-name-prefix python3 \
|
||||
--name $PKGNAME \
|
||||
--maintainer 'compAIR development team <kontakt@comp-air.at>' \
|
||||
--vendor compAIR \
|
||||
--iteration $EXTRA_VER \
|
||||
--deb-priority optional \
|
||||
--architecture ${{ matrix.platform.fpm }} \
|
||||
--output-type deb \
|
||||
setup.py
|
||||
|
||||
- name: Print packages contents
|
||||
run: |
|
||||
for f in *.deb; do
|
||||
echo "$f:"
|
||||
dpkg-deb -c "$f"
|
||||
echo
|
||||
done
|
||||
|
||||
- name: Print packages control info
|
||||
run: |
|
||||
for f in *.deb; do
|
||||
echo "$f:"
|
||||
dpkg-deb -e "$f"
|
||||
cat DEBIAN/control
|
||||
echo
|
||||
done
|
||||
|
||||
# https://forgejo.org/docs/latest/user/packages/debian/#publish-a-package
|
||||
- name: push deb to apt repository
|
||||
if: github.ref == 'refs/heads/master'
|
||||
env:
|
||||
REPO: ${{ github.repository }}
|
||||
TAG: ${{ steps.tag.outputs.tag }}
|
||||
run: |
|
||||
url="$GITHUB_SERVER_URL/api/packages/${{ github.repository_owner }}/debian/pool/bookworm/compair/upload"
|
||||
echo "api url: $url"
|
||||
|
||||
debver="${UPSTREAM_VER}-${EXTRA_VER}"
|
||||
debfile="_packages/${PKGNAME}_${debver}_all.deb"
|
||||
echo "uploading file: $debfile"
|
||||
|
||||
curl --fail-with-body \
|
||||
-X PUT \
|
||||
--user "oauth2:${{ secrets.PACKAGE_REGISTRY_TOKEN }}" \
|
||||
--upload-file "$debfile" \
|
||||
"$url"
|
||||
|
||||
echo "final url: $GITHUB_SERVER_URL/${{ github.repository_owner }}/-/packages/debian/${PKGNAME}/${debver}"
|
Loading…
Add table
Add a link
Reference in a new issue