From: Peter van Dijk Date: Wed, 16 Mar 2022 15:31:08 +0000 (+0100) Subject: expand builder-dispatch workflow for release building X-Git-Tag: rec-4.9.0-alpha0~5^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=46c0d752f90186fd6d32e0bf403ed377fda17e37;p=thirdparty%2Fpdns.git expand builder-dispatch workflow for release building --- diff --git a/.github/workflows/builder-dispatch.yml b/.github/workflows/builder-dispatch.yml index 6d5e8b06cb..190765991c 100644 --- a/.github/workflows/builder-dispatch.yml +++ b/.github/workflows/builder-dispatch.yml @@ -12,27 +12,63 @@ on: - recursor - dnsdist os: - description: OS to build for + description: OSes to build for, space separated type: string + default: > + el-7 + el-8 + el-9 + debian-buster + debian-bullseye + ubuntu-bionic + ubuntu-focal + ubuntu-jammy + ref: + description: git ref to checkout + type: string + default: master + is_release: + description: is this a release build? + type: choice + options: + - 'NO' + - 'YES' jobs: + prepare: + name: generate OS list + runs-on: ubuntu-20.04 + outputs: + oslist: ${{ steps.get-oslist.outputs.oslist }} + steps: + - run: sudo apt-get update && sudo apt-get -y install jo + - id: get-oslist + run: echo "::set-output name=oslist::"$(jo -a ${{ github.event.inputs.os }}) + - run: echo "###::set-output name=oslist::"$(jo -a ${{ github.event.inputs.os }}) + build: - name: build ${{ github.event.inputs.product }} for ${{ github.event.inputs.os }} + needs: prepare + name: build ${{ github.event.inputs.product }} (${{ github.event.inputs.ref }}) for ${{ matrix.os }} # on a ubuntu-20.04 VM runs-on: ubuntu-20.04 + strategy: + matrix: + os: ${{fromJson(needs.prepare.outputs.oslist)}} + fail-fast: false steps: - uses: actions/checkout@v2.3.4 with: fetch-depth: 0 # for correct version numbers submodules: recursive + ref: ${{ github.event.inputs.ref }} # this builds packages and runs our unit tests (make check) - - run: builder/build.sh -v -m ${{ github.event.inputs.product }} ${{ github.event.inputs.os }} + - run: IS_RELEASE=${{ github.event.inputs.is_release}} builder/build.sh -v -m ${{ github.event.inputs.product }} ${{ matrix.os }} - name: Get version number run: 'echo ::set-output name=version::$(readlink builder/tmp/latest)' id: getversion - name: Upload packages uses: actions/upload-artifact@v2 with: - name: ${{ github.event.inputs.product }}-${{ github.event.inputs.os }}-${{ steps.getversion.outputs.version }} + name: ${{ github.event.inputs.product }}-${{ matrix.os }}-${{ steps.getversion.outputs.version }} path: built_pkgs/ retention-days: 7