ci: add python-logstash-async
Signed-off-by: Christoph Heiss <christoph.heiss@robo4you.at>
This commit is contained in:
parent
30eab05246
commit
2497d40f6f
1 changed files with 102 additions and 0 deletions
102
.github/workflows/python-logstash-async.yaml
vendored
Normal file
102
.github/workflows/python-logstash-async.yaml
vendored
Normal file
|
@ -0,0 +1,102 @@
|
||||||
|
name: python-logstash-async
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
paths:
|
||||||
|
- .github/workflows/python-logstash-async.yaml
|
||||||
|
pull_request:
|
||||||
|
paths:
|
||||||
|
- .github/workflows/python-logstash-async.yaml
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-deb:
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
platform:
|
||||||
|
- runner-group: dind
|
||||||
|
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/python-logstash-async
|
||||||
|
ref: 3.0.0
|
||||||
|
|
||||||
|
- 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-logstash-async \
|
||||||
|
--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-logstash-async_${{ 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
|
Loading…
Add table
Add a link
Reference in a new issue