Merge pull request #5 from F-WuTS/python3-pylogbeat

add pylogbeat
This commit is contained in:
Christoph Heiss 2024-10-30 16:34:22 +01:00 committed by GitHub
commit 47df91b16d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

98
.github/workflows/pylogbeat.yaml vendored Normal file
View file

@ -0,0 +1,98 @@
name: pylogbeat
on:
push:
branches:
- master
pull_request:
jobs:
build-deb:
strategy:
matrix:
platform:
- runner-group: Default
dpkg: all
fpm: all
runs-on:
group: ${{ matrix.platform.runner-group }}
container:
image: node:22-bookworm
steps:
- name: Checkout python-logstash-async
uses: actions/checkout@v4
with:
repository: eht16/pylogbeat
ref: 2.0.1
- name: Fix git safe.directory
run: git config --global --add safe.directory $GITHUB_WORKSPACE
- 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 python3-pylogbeat \
--maintainer 'compAIR development team <kontakt@comp-air.at>' \
--vendor compAIR \
--iteration compair1 \
--deb-priority optional \
--architecture ${{ matrix.platform.fpm }} \
--output-type deb \
setup.py
- name: Copy over deb files to target directory
run: |
mkdir -p _packages
cp -v *.deb _packages/
- name: Print packages contents
run: |
for f in _packages/*.deb; do
echo "$f:"
dpkg-deb -c "$f"
echo
done
- name: Print packages control info
run: |
for f in _packages/*.deb; do
echo "$f:"
dpkg-deb -e "$f"
cat DEBIAN/control
echo
done
- name: Upload deb as artifact
uses: actions/upload-artifact@v4
with:
name: python3-pylogbeat_${{ matrix.platform.dpkg }}
path: _packages/*
if-no-files-found: error
overwrite: true
- name: Push deb to compREP
uses: cpina/github-action-push-to-another-repository@main
if: github.ref == 'refs/heads/master'
env:
SSH_DEPLOY_KEY: ${{ secrets.SSH_DEPLOY_KEY }}
with:
source-directory: "_packages/"
target-directory: "debs/complib/"
destination-github-username: "F-WuTS"
destination-repository-name: "compREP"
target-branch: master