From 7eff48b900b21498c2be454f82e2bfbc072058ae Mon Sep 17 00:00:00 2001 From: Jakob Meier Date: Sun, 13 Aug 2023 20:02:55 +0200 Subject: [PATCH] Basic forgejo-actions build script --- .forgejo/workflows/build-all.yml | 40 ++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .forgejo/workflows/build-all.yml diff --git a/.forgejo/workflows/build-all.yml b/.forgejo/workflows/build-all.yml new file mode 100644 index 0000000..98c87fa --- /dev/null +++ b/.forgejo/workflows/build-all.yml @@ -0,0 +1,40 @@ +--- +on: [push] +jobs: + build-all: + runs-on: docker + container: + image: alpine:edge + + steps: + - name: Install checkout dependencies + run: apk add nodejs git + - name: Checkout + uses: actions/checkout@v2 + # SETUP BUILD TOOLS + - name: Install tools + run: apk add abuild doas fd dateutils bash + - name: Setup private key + run: echo "${{ secrets.PRIVKEY }}" > $PWD/comcloudway@ccw.icu.rsa + - name: Configure abuild + run: > + echo PACKAGER_PRIVKEY="$PWD/comcloudway@ccw.icu.rsa" + > /etc/abuild.conf + - name: Add public key to trusted keys + run: cp comcloudway@ccw.icu.rsa.pub /etc/apk/keys + - name: Add custom repo to system repos + run: echo "/home/builder/packages" >> /etc/apk/repositories + # SETUP BUILD USER + - name: Setup build user + run: adduser -D builder + - name: Add build user to abuild group + run: adduser builder abuild + - name: Make sure the builddir is writetable + run: chown -R builder . + - name: Setup doas + run: echo permit nopass :wheel > /etc/doas.d/abuild.conf + # RUN BUILD SCRIPT + - name: Build main repo + run: doas -u builder ./build.sh repo main + - name: Build testing repo + run: doas -u builder ./build.sh repo testing -- 2.38.5