on: - workflow-dispatch - push jobs: build: runs-on: ubuntu-latest container: image: alpine:edge steps: - name: set up dependencies run: | apk update apk upgrade apk add nodejs git alpine-sdk - uses: actions/checkout@v4 name: checkout the alpine dir with: sparse-checkout: "alpine/" # - uses: actions/checkout@v4 # name: checkout the rest in the alpine dir # with: # path: 'alpine/continuwuity' - name: set up user run: adduser -DG abuild ci - name: set up keys run: | pwd mkdir ~/.abuild echo "${{ secrets.abuild_privkey }}" > ~/.abuild/ci@continuwuity.rsa echo "${{ secrets.abuild_pubkey }}" > ~/.abuild/ci@continuwuity.rsa.pub echo $HOME echo 'PACKAGER_PRIVKEY="/root/.abuild/ci@continuwuity.rsa"' > ~/.abuild/abuild.conf ls ~/.abuild - name: go go gadget abuild run: | cd alpine # modify the APKBUILD to use the current branch instead of the release # note that it seems to require the repo to be public (as you'll get # a 404 even if the token is provided) export ARCHIVE_URL="${{ github.server_url }}/${{ github.repository }}/archive/${{ github.ref_name }}.tar.gz" echo $ARCHIVE_URL sed -i '/^source=/c\source="'"$ARCHIVE_URL" APKBUILD abuild -F checksum abuild -Fr