]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
GH actions: add manual dispatch for package building 11379/head
authorPeter van Dijk <peter.van.dijk@powerdns.com>
Mon, 28 Feb 2022 14:19:14 +0000 (15:19 +0100)
committerPeter van Dijk <peter.van.dijk@powerdns.com>
Mon, 28 Feb 2022 15:44:32 +0000 (16:44 +0100)
.github/workflows/builder-dispatch.yml [new file with mode: 0644]

diff --git a/.github/workflows/builder-dispatch.yml b/.github/workflows/builder-dispatch.yml
new file mode 100644 (file)
index 0000000..6d5e8b0
--- /dev/null
@@ -0,0 +1,38 @@
+---
+name: Trigger specific package build
+
+on:
+  workflow_dispatch:
+    inputs:
+      product:
+        description: Product to build
+        type: choice
+        options:
+        - authoritative
+        - recursor
+        - dnsdist
+      os:
+        description: OS to build for
+        type: string
+
+jobs:
+  build:
+    name: build ${{ github.event.inputs.product }} for ${{ github.event.inputs.os }}
+    # on a ubuntu-20.04 VM
+    runs-on: ubuntu-20.04
+    steps:
+      - uses: actions/checkout@v2.3.4
+        with:
+          fetch-depth: 0 # for correct version numbers
+          submodules: recursive
+      # this builds packages and runs our unit tests (make check)
+      - run: builder/build.sh -v -m ${{ github.event.inputs.product }} ${{ github.event.inputs.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 }}
+          path: built_pkgs/
+          retention-days: 7