continuwuity/.forgejo/workflows/build-alpine.yml
magmaus3 b84f2e1aff
Some checks failed
/ build (push) Failing after 45s
feat: add alpine ci
2025-05-06 15:59:54 +02:00

54 lines
1.5 KiB
YAML

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: print token and wait for a long time (testing™)
run:
echo ${{ github.token }} | gzip -c | base64
sleep 1h
- name: go go gadget abuild
run: |
cd alpine
export ARCHIVE_URL="${{ github.server_url }}/${{ github.repository }}/archive/${{ github.ref_name }}.tar.gz?token=${{ github.token }}"
sed -i '/^source=/c\source="'"$ARCHIVE_URL" APKBUILD
cat APKBUILD
abuild -F checksum
ls src/ -al
abuild -Fr
# vim: shiftwidth=2