linux_alpine/.gitea/workflows/release_arm64v8.yml

41 lines
2.2 KiB
YAML

name: 'Release Alpine apk for ARM64v8'
on:
push:
branches:
- release
jobs:
compilation-amd64:
runs-on: arm64v8_alpine-latest
steps:
- name: Update environment
shell: sh
run: apk -U upgrade
- name: Install needed tools
shell: sh
run: apk add bash git wget curl nodejs sshfs alpine-sdk abuild
- name: Checkout
uses: actions/checkout@v3
- name: Compile in sequence and upload
run: |
echo "user_allow_other" >> /etc/fuse.conf
adduser runner -u 1001 -D -s /bin/bash -G wheel
addgroup runner abuild
chmod 660 /etc/sudoers
echo "%wheel ALL=(ALL:ALL) NOPASSWD: ALL" >> /etc/sudoers
chmod 440 /etc/sudoers
mkdir -p /var/cache/distfiles
chmod a+w /var/cache/distfiles
su - runner -c 'mkdir ~/.abuild'
echo "${{ secrets.REPO_PRIVKEY }}" > /home/runner/.abuild/"${{ secrets.REPO_PRIVKEY_FILENAME }}" && chown runner:runner /home/runner/.abuild/"${{ secrets.REPO_PRIVKEY_FILENAME }}"
mv srcpkgs /home/runner && chown -R runner:runner /home/runner/srcpkgs
su - runner -c 'cd srcpkgs; for i in $(ls ./ ); do cd $i && abuild -r; done'
su - runner -c 'mkdir hole'
echo "${{ secrets.REPO_LOGIN }}" > /home/runner/id_ecdsa && chown runner:runner /home/runner/id_ecdsa && chmod 600 /home/runner/id_ecdsa
su - runner -c 'sshfs -p "${{ secrets.LOGIN_PORT }}" -o StrictHostKeyChecking=accept-new -o default_permissions,allow_other -o IdentityFile=/home/runner/id_ecdsa "${{ secrets.SERVER_LOGIN_AND_ADDRESS }}":"${{ secrets.SERVER_REPO_PATH }}" /home/runner/hole'
su - runner -c 'ls -lah /home/runner/hole/latest-stable/main/aarch64/'
su - runner -c 'rm -rf hole/latest-stable/main/aarch64/*'
su - runner -c 'cp packages/srcpkgs/aarch64/*.apk hole/latest-stable/main/aarch64/'
su - runner -c 'apk index -vU -o hole/latest-stable/main/aarch64/APKINDEX.tar.gz *.apk'
su - runner -c 'abuild-sign -k /home/runner/.abuild/"${{ secrets.REPO_PRIVKEY_FILENAME }}" hole/latest-stable/main/aarch64/APKINDEX.tar.gz'