~comcloudway/ccw-aports

7eff48b900b21498c2be454f82e2bfbc072058ae — Jakob Meier 1 year, 1 month ago d04c98f
Basic forgejo-actions build script
1 files changed, 40 insertions(+), 0 deletions(-)

A .forgejo/workflows/build-all.yml
A .forgejo/workflows/build-all.yml => .forgejo/workflows/build-all.yml +40 -0
@@ 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