From 6909ec2185cf91c9821acf7ac0c6482bd2107eb8 Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Fri, 16 Aug 2024 01:22:23 -0400 Subject: [PATCH 1/2] forgejo-ci: add multitarget build workflows --- .forgejo/bin/deploy.sh | 2 +- .forgejo/patches/build.patch | 2 +- .forgejo/workflows/build-edge.yaml | 2 ++ .forgejo/workflows/build-v3.19.yaml | 54 +++++++++++++++++++++++++++++ .forgejo/workflows/build-v3.20.yaml | 54 +++++++++++++++++++++++++++++ 5 files changed, 112 insertions(+), 2 deletions(-) create mode 100644 .forgejo/workflows/build-v3.19.yaml create mode 100644 .forgejo/workflows/build-v3.20.yaml diff --git a/.forgejo/bin/deploy.sh b/.forgejo/bin/deploy.sh index 05de4d6..a75d5e6 100755 --- a/.forgejo/bin/deploy.sh +++ b/.forgejo/bin/deploy.sh @@ -3,7 +3,7 @@ # shellcheck disable=SC3040 set -eu -o pipefail -readonly BASEBRANCH=$(grep PRETTY_NAME /etc/os-release | awk '{print $3}' | tr -d '"') +readonly BASEBRANCH=$CI_ALPINE_TARGET readonly TARGET_REPO=$CI_ALPINE_REPO get_qubes_release() { diff --git a/.forgejo/patches/build.patch b/.forgejo/patches/build.patch index eb17134..81015ef 100644 --- a/.forgejo/patches/build.patch +++ b/.forgejo/patches/build.patch @@ -25,7 +25,7 @@ index c3b8f7a..0b1c9a5 } get_release() { -+ echo $(grep PRETTY_NAME /etc/os-release | awk '{print $3}' | tr -d '"') ++ echo $CI_ALPINE_TARGET +} + + diff --git a/.forgejo/workflows/build-edge.yaml b/.forgejo/workflows/build-edge.yaml index d077e49..91f86a4 100644 --- a/.forgejo/workflows/build-edge.yaml +++ b/.forgejo/workflows/build-edge.yaml @@ -12,6 +12,7 @@ jobs: CI_DEBUG_BUILD: ${{ runner.debug }} CI_MERGE_REQUEST_PROJECT_URL: ${{ github.server_url }}/${{ github.repository }} CI_MERGE_REQUEST_TARGET_BRANCH_NAME: ${{ github.base_ref }} + CI_ALPINE_TARGET: edge steps: - name: Environment setup run: | @@ -41,6 +42,7 @@ jobs: CI_ALPINE_REPO: 'https://ayakael.net/api/packages/forge/alpine' FORGE_REPO_TOKEN: ${{ secrets.FORGE_REPO_TOKEN }} FORGE_REPO_USER: ${{ vars.FORGE_REPO_USER }} + CI_ALPINE_TARGET: edge steps: - name: Setting up environment run: apk add nodejs curl findutils git gawk diff --git a/.forgejo/workflows/build-v3.19.yaml b/.forgejo/workflows/build-v3.19.yaml new file mode 100644 index 0000000..2561981 --- /dev/null +++ b/.forgejo/workflows/build-v3.19.yaml @@ -0,0 +1,54 @@ +on: + pull_request: + types: [ assigned, opened, synchronize, reopened ] + +jobs: + build-v3.19: + runs-on: x86_64 + container: + image: alpinelinux/alpine-gitlab-ci:latest + 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 }} + CI_ALPINE_TARGET: v3.19 + steps: + - name: Environment setup + run: | + doas apk add nodejs git patch curl + 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: Package build + run: | + doas patch -d / -p1 -i ${{ github.workspace }}/.forgejo/patches/build.patch + build.sh + - name: Package upload + uses: forgejo/upload-artifact@v3 + with: + name: package + path: packages + + deploy-v3.19: + needs: [build-v3.19] + runs-on: x86_64 + container: + image: alpine:latest + env: + CI_ALPINE_REPO: 'https://ayakael.net/api/packages/forge/alpine' + CI_ALPINE_TARGET: v3.19 + FORGE_REPO_TOKEN: ${{ secrets.FORGE_REPO_TOKEN }} + FORGE_REPO_USER: ${{ vars.FORGE_REPO_USER }} + steps: + - name: Setting up environment + run: apk add nodejs curl findutils git gawk + - name: Repo pull + uses: actions/checkout@v4 + - name: Package download + uses: forgejo/download-artifact@v3 + - name: Package deployment + run: ${{ github.workspace }}/.forgejo/bin/deploy.sh diff --git a/.forgejo/workflows/build-v3.20.yaml b/.forgejo/workflows/build-v3.20.yaml new file mode 100644 index 0000000..d693f55 --- /dev/null +++ b/.forgejo/workflows/build-v3.20.yaml @@ -0,0 +1,54 @@ +on: + pull_request: + types: [ assigned, opened, synchronize, reopened ] + +jobs: + build-v3.20: + runs-on: x86_64 + container: + image: alpinelinux/alpine-gitlab-ci:latest + 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 }} + CI_ALPINE_TARGET: v3.20 + steps: + - name: Environment setup + run: | + doas apk add nodejs git patch curl + 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: Package build + run: | + doas patch -d / -p1 -i ${{ github.workspace }}/.forgejo/patches/build.patch + build.sh + - name: Package upload + uses: forgejo/upload-artifact@v3 + with: + name: package + path: packages + + deploy-v3.20: + needs: [build-v3.20] + runs-on: x86_64 + container: + image: alpine:latest + env: + CI_ALPINE_TARGET: v3.20 + CI_ALPINE_REPO: 'https://ayakael.net/api/packages/forge/alpine' + FORGE_REPO_TOKEN: ${{ secrets.FORGE_REPO_TOKEN }} + FORGE_REPO_USER: ${{ vars.FORGE_REPO_USER }} + steps: + - name: Setting up environment + run: apk add nodejs curl findutils git gawk + - name: Repo pull + uses: actions/checkout@v4 + - name: Package download + uses: forgejo/download-artifact@v3 + - name: Package deployment + run: ${{ github.workspace }}/.forgejo/bin/deploy.sh -- 2.45.2 From a138662e442d741172d477ac2cf01df5efd2bd45 Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Fri, 16 Aug 2024 08:04:36 -0400 Subject: [PATCH 2/2] qubes-vm-utils: bump --- qubes-vm-utils/APKBUILD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qubes-vm-utils/APKBUILD b/qubes-vm-utils/APKBUILD index b0e59e1..e5df3cd 100644 --- a/qubes-vm-utils/APKBUILD +++ b/qubes-vm-utils/APKBUILD @@ -7,7 +7,7 @@ subpackages=" $pkgname-pyc " pkgver=4.3.3 -pkgrel=1 +pkgrel=2 _gittag="v$pkgver" pkgdesc="Common Linux files for Qubes VM." arch="x86_64" -- 2.45.2