From: Jason Ish Date: Tue, 11 Feb 2025 23:09:23 +0000 (-0600) Subject: github-ci: add var to disable rpm builds X-Git-Tag: suricata-8.0.0-beta1~349 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1dcb1e3f29d08adce63daff7ec1789c2f22e0573;p=thirdparty%2Fsuricata.git github-ci: add var to disable rpm builds There will be changes in our development branch that the RPMs need to adapt to, but that can't be done until the changes have been merged to master, then the RPM can catchup. This gives us a single variable to turn off RPM building. --- diff --git a/.github/workflows/builds.yml b/.github/workflows/builds.yml index a3fe9dbc95..113448f93c 100644 --- a/.github/workflows/builds.yml +++ b/.github/workflows/builds.yml @@ -400,6 +400,8 @@ jobs: container: - almalinux:9 - fedora:40 + env: + skip: false steps: - name: Cache cargo registry uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 @@ -414,7 +416,13 @@ jobs: key: ${{ github.job }}-dnf - run: echo "keepcache=1" >> /etc/dnf/dnf.conf + - name: Download Suricata distribution archive + uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 + with: + name: dist + - name: Install packages + if: ${{ env.skip != 'true' }} run: | if test -e /etc/almalinux-release; then dnf -y install \ @@ -435,31 +443,26 @@ jobs: echo "ERROR: Unsupported distribution for RPM building" exit 1 fi - - name: Download Suricata distribution archive - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 - with: - name: dist - - run: git clone https://github.com/jasonish/suricata-rpms - - run: make update-release update-sources - working-directory: suricata-rpms/devel - - run: dnf -y install $(rpmspec -q --buildrequires ./suricata.spec) - working-directory: suricata-rpms/devel - - run: mv suricata-*.tar.gz suricata-rpms/devel - - run: make srpm - working-directory: suricata-rpms/devel - - run: make local - working-directory: suricata-rpms/devel + - if: ${{ env.skip != 'true' }} + run: | + git clone https://github.com/jasonish/suricata-rpms + cd suricata-rpms/devel + make update-release update-sources + dnf -y install $(rpmspec -q --buildrequires ./suricata.spec) + mv ../../suricata-*.tar.gz . + make srpm + make local # We need a step for each RPM upload as we can't use the # container name directly in an artifact, as artifacts can't # have ':' in the name. - - if: matrix.container == 'fedora:40' + - if: matrix.container == 'fedora:40' && ${{ env.skip != 'true' }} uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 name: Uploading RPMs with: name: rpms-fedora-40 path: suricata-rpms/devel/rpms - - if: matrix.container == 'almalinux:9' + - if: matrix.container == 'almalinux:9' && ${{ env.skip != 'true' }} uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 name: Uploading RPMs with: