From 2eef3378c3da834a1a4331408f0d49c28fbb830c Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Wed, 21 Aug 2024 10:15:44 -0400 Subject: [PATCH] forgejo-ci: add test build workflow --- .forgejo/workflows/test-build.yaml | 40 ++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .forgejo/workflows/test-build.yaml diff --git a/.forgejo/workflows/test-build.yaml b/.forgejo/workflows/test-build.yaml new file mode 100644 index 0000000..96b5b0f --- /dev/null +++ b/.forgejo/workflows/test-build.yaml @@ -0,0 +1,40 @@ +on: + pull_request: + types: [ assigned, opened, synchronize, reopened ] + +jobs: + build-test: + runs-on: x86_64 + container: + image: alpine:3.20 + env: + CI_PROJECT_DIR: ${{ github.workspace }} + CI_DEBUG_BUILD: ${{ runner.debug }} + CI_MERGE_REQUEST_PROJECT_URL: ${{ github.server_url }}/${{ github.repository }} + CI_MERGE_REQUEST_TARGET_BRANCH_NAME: ${{ github.base_ref }} + steps: + - name: Environment setup + run: | + doas apk add rpm wget losetup coreutils eudev e2fsprogs xen + cd /etc/apk/keys + doas curl -JO https://ayakael.net/api/packages/forge/alpine/key + - name: Repo pull + uses: actions/checkout@v4 + with: + fetch-depth: 500 + - name: RPM build + run: | + git clone https://github.com/QubesOS/qubes-builder + mkdir qubes-builder/qubes-src + ln -s $CI_PROJECT_DIR qubes-builder/qubes-src/builder-alpine + cp builder.conf qubes-builder/. + git clone https://github.com/QubesOS/qubes-linux-template-builder qubes-builder/qubes-src/linux-template-builder + echo "%define _arch x86_64" >> qubes-builder/qubes-src/linux-template-builder/templates.spec + cd qubes-builder + make linux-template-builder + cp qubes-src/linux-template-builder/rpm/noarch/qubes-template-*.rpm $GITHUB_WORKSPACE/. + - name: Package upload + uses: forgejo/upload-artifact@v3 + with: + name: package + path: packages