From a94ac09684cf93c1389b29db44d17cb04ca65d60 Mon Sep 17 00:00:00 2001 From: Trekkie <111065900+TrekkieCoder@users.noreply.github.com> Date: Tue, 12 Nov 2024 11:10:06 +0900 Subject: [PATCH 1/2] gh-868 Generate packages runnable with systemd --- .github/workflows/package.yaml | 44 ++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 .github/workflows/package.yaml diff --git a/.github/workflows/package.yaml b/.github/workflows/package.yaml new file mode 100644 index 000000000..f9b71de8e --- /dev/null +++ b/.github/workflows/package.yaml @@ -0,0 +1,44 @@ +name: OS-Build-Releases + +on: + schedule: + # Runs "At 22:00 UTC every day-of-week" + - cron: '0 22 * * *' + workflow_dispatch: + inputs: + tagName: + description: 'Tag Name (e.g 0.9.7 or latest)' + required: true + default: 'latest' + +jobs: + build: + name: Build OS packages + runs-on: ubuntu-20.04 + permissions: + contents: write + packages: write + steps: + - uses: actions/checkout@v2 + with: + submodules: recursive + - uses: actions/setup-python@v2 + - uses: actions/setup-go@v3 + with: + go-version: '>=1.18.0' + - name: Install Dependencies + run: sudo apt-get update && sudo apt-get -y install clang-10 llvm libelf-dev gcc-multilib libpcap-dev elfutils dwarves git linux-tools-$(uname -r) libbsd-dev bridge-utils unzip build-essential bison flex iproute2 + - name: Perform any pre-requisite operations + run: | + sudo mkdir -p /opt/loxilb/ + sudo apt-get purge -y libssl-dev 2>&1 >> /dev/null | true + - name: Build loxilb deb package + run: | + git clone https://github.com/loxilb-io/tools.git && cd tools/pkg/ && make major=${{ github.event.inputs.tagName }} && cd - + - name: Upload the package to a release + if: github.repository == 'loxilb-io/loxilb' + uses: ncipollo/release-action@v1 + with: + tag: v${{ github.event.inputs.tagName }} + allowUpdates: true + artifacts: "tools/pkg/*.deb" From 06cb9194f60e2c3d0936b8955916443474b84339 Mon Sep 17 00:00:00 2001 From: Trekkie <111065900+TrekkieCoder@users.noreply.github.com> Date: Tue, 12 Nov 2024 11:15:53 +0900 Subject: [PATCH 2/2] Update package.yaml --- .github/workflows/package.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/package.yaml b/.github/workflows/package.yaml index f9b71de8e..2ede3e109 100644 --- a/.github/workflows/package.yaml +++ b/.github/workflows/package.yaml @@ -34,11 +34,11 @@ jobs: sudo apt-get purge -y libssl-dev 2>&1 >> /dev/null | true - name: Build loxilb deb package run: | - git clone https://github.com/loxilb-io/tools.git && cd tools/pkg/ && make major=${{ github.event.inputs.tagName }} && cd - + git clone https://github.com/loxilb-io/tools.git build-tools && cd build-tools/pkg/ && make major=${{ github.event.inputs.tagName }} && cd - - name: Upload the package to a release if: github.repository == 'loxilb-io/loxilb' uses: ncipollo/release-action@v1 with: tag: v${{ github.event.inputs.tagName }} allowUpdates: true - artifacts: "tools/pkg/*.deb" + artifacts: "build-tools/pkg/*.deb"