Skip to content

chore: Update Snort build workflow to copy generated .deb files to th… #31

chore: Update Snort build workflow to copy generated .deb files to th…

chore: Update Snort build workflow to copy generated .deb files to th… #31

Workflow file for this run

name: Build and Package Snort 3
on:
push:
branches:
- "*"
jobs:
build:
name: Build and Package Snort 3
runs-on: ubuntu-latest
strategy:
matrix:
arch: [amd64, arm64]
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Install dependencies
run: sudo apt-get update && sudo apt-get install -y git dpkg-dev
- name: Build and Package Snort 3
run: |
ARCH=${{ matrix.arch }}
bash ./scripts/snort3.sh
mkdir -p /work/packages/$ARCH
mv /work/*.deb /work/packages/$ARCH/
- name: Upload packages
uses: actions/upload-artifact@v3
with:
name: snort3-packages-${{ matrix.arch }}
path: /work/packages/${{ matrix.arch }}
deploy:
name: Publish to GitHub Packages
runs-on: ubuntu-latest
needs: build
steps:
- name: Download amd64 packages
uses: actions/download-artifact@v3
with:
name: snort3-packages-amd64
path: /work/packages/amd64
- name: Download arm64 packages
uses: actions/download-artifact@v3
with:
name: snort3-packages-arm64
path: /work/packages/arm64
- name: Publish .deb packages
run: |
for arch in amd64 arm64; do
cd /work/packages/$arch
gh release upload --repo github.com/ADORSYS-GIS/wazuh-snort ${{ github.ref_name }} *.deb --clobber
cd ../../../
done