Skip to content

Commit

Permalink
chore: Update Snort build workflow to copy generated .deb files to th…
Browse files Browse the repository at this point in the history
…e designated work directory
  • Loading branch information
bengo237 committed Aug 26, 2024
1 parent 843663e commit caba4b5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/package-snort.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,14 @@ jobs:
run: |
ARCH=${{ matrix.arch }}
bash ./scripts/snort3.sh
mkdir -p packages/$ARCH
mv *.deb packages/$ARCH/
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: packages/${{ matrix.arch }}
path: /work/packages/${{ matrix.arch }}

deploy:
name: Publish to GitHub Packages
Expand All @@ -50,18 +50,18 @@ jobs:
uses: actions/download-artifact@v3
with:
name: snort3-packages-amd64
path: packages/amd64
path: /work/packages/amd64

- name: Download arm64 packages
uses: actions/download-artifact@v3
with:
name: snort3-packages-arm64
path: packages/arm64
path: /work/packages/arm64

- name: Publish .deb packages
run: |
for arch in amd64 arm64; do
cd packages/$arch
cd /work/packages/$arch
gh release upload --repo github.com/ADORSYS-GIS/wazuh-snort ${{ github.ref_name }} *.deb --clobber
cd ../../
cd ../../../
done
2 changes: 1 addition & 1 deletion scripts/snort3.sh
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ export my_path=/usr/local
cd build
make -j$(nproc)
sudo checkinstall --pkgname=snort3 --pkgversion=${SNORT_VER} --backup=no --deldoc=yes --fstrans=no --default
sudo cp *.deb $WORK_DIR


cd $WORK_DIR
rm -rf snort3-${SNORT_VER} ${SNORT_VER}.tar.gz
Expand Down

0 comments on commit caba4b5

Please sign in to comment.