From caba4b5dce9f1f6f0263568da02afb082771f8b5 Mon Sep 17 00:00:00 2001 From: Dylane Bengono Date: Mon, 26 Aug 2024 18:34:52 +0100 Subject: [PATCH] chore: Update Snort build workflow to copy generated .deb files to the designated work directory --- .github/workflows/package-snort.yml | 14 +++++++------- scripts/snort3.sh | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/package-snort.yml b/.github/workflows/package-snort.yml index 4546922..88b987f 100644 --- a/.github/workflows/package-snort.yml +++ b/.github/workflows/package-snort.yml @@ -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 @@ -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 diff --git a/scripts/snort3.sh b/scripts/snort3.sh index a7093ed..df3e89e 100644 --- a/scripts/snort3.sh +++ b/scripts/snort3.sh @@ -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