-
Notifications
You must be signed in to change notification settings - Fork 0
77 lines (63 loc) · 1.97 KB
/
package-snort.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
name: Build and Package Snort 3
on:
push:
branches:
- "*"
permissions:
contents: write
jobs:
build:
name: Build and Package Snort 3
runs-on: ubuntu-latest
strategy:
matrix:
arch: [amd64, arm64]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- 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@v4
with:
name: snort3-packages-${{ matrix.arch }}
path: /work/packages/${{ matrix.arch }}
deploy:
name: Publish to GitHub Releases
runs-on: ubuntu-latest
needs: build
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Create Release
id: create_release
uses: actions/create-release@v1
with:
tag_name: ${{ github.run_id }}
release_name: Snort 3 Packages ${{ github.run_id }}
draft: false
prerelease: false
- name: Upload amd64 packages
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: /work/packages/amd64/*.deb
asset_name: snort3-amd64.deb
asset_content_type: application/octet-stream
- name: Upload arm64 packages
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: /work/packages/arm64/*.deb
asset_name: snort3-arm64.deb
asset_content_type: application/octet-stream