linux_alpine/.gitea/workflows/release_arm64v8.yml

56 lines
3.3 KiB
YAML
Raw Permalink Normal View History

2024-01-27 16:47:19 +01:00
name: 'Release Alpine apk for ARM64v8'
on:
push:
branches:
- release
jobs:
2024-01-27 19:34:09 +01:00
compilation-arm64v8:
2024-01-27 19:27:38 +01:00
runs-on: arm64v8-alpine-latest-pv
2024-01-27 16:47:19 +01:00
steps:
2024-02-22 22:03:05 +01:00
- name: Select faster mirror and add tools
2024-02-22 22:09:01 +01:00
shell: sh
2024-02-22 22:03:05 +01:00
run: |
echo "https://alpine.sakamoto.pl/alpine/$(cat /etc/os-release | grep PRETT | cut -d ' ' -f 3 | cut -d '"' -f 1)/main" > /etc/apk/repositories
echo "https://alpine.sakamoto.pl/alpine/$(cat /etc/os-release | grep PRETT | cut -d ' ' -f 3 | cut -d '"' -f 1)/community" >> /etc/apk/repositories
2024-02-22 22:09:01 +01:00
apk -U upgrade
apk add bash git wget curl nodejs sshfs alpine-sdk abuild sudo shadow
2024-01-27 16:47:19 +01:00
- name: Checkout
uses: actions/checkout@v3
- name: Set up environment and users
2024-01-27 16:47:19 +01:00
run: |
echo "user_allow_other" >> /etc/fuse.conf
2024-02-22 21:48:02 +01:00
adduser runner -u 1001 -D -s /bin/bash -G wheel
2024-01-27 19:34:09 +01:00
addgroup -g 1001 runner
2024-01-27 16:47:19 +01:00
addgroup runner abuild
2024-01-27 19:34:09 +01:00
addgroup runner runner
2024-01-27 16:47:19 +01:00
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
2024-02-22 21:48:02 +01:00
chsh -s /bin/bash
2024-01-27 16:47:19 +01:00
su - runner -c 'mkdir ~/.abuild'
2024-02-22 21:48:02 +01:00
echo "setup done"
- name: Set up keys
run: |
2024-01-27 20:02:04 +01:00
wget -q https://static.itmodulo.eu/dl/repo/public_keys/alpine/itmodulo%40disroot.org-65b4f779.rsa.pub -P /etc/apk/keys
2024-01-27 20:05:37 +01:00
su - runner -c 'wget -q https://static.itmodulo.eu/dl/repo/public_keys/alpine/itmodulo%40disroot.org-65b4f779.rsa.pub -P ~/.abuild/'
2024-01-27 19:56:32 +01:00
echo "${{ secrets.REPO_PRIVKEY }}" > /home/runner/.abuild/${{ secrets.REPO_PRIVKEY_FILENAME }} && chown runner:runner /home/runner/.abuild/${{ secrets.REPO_PRIVKEY_FILENAME }}
2024-02-22 21:48:02 +01:00
su - runner -c "echo 'PACKAGER_PRIVKEY="/home/runner/.abuild/${{ secrets.REPO_PRIVKEY_FILENAME }}"' >> ~/.abuild/abuild.conf"
- name: Compile in sequence
2024-02-06 23:12:38 +01:00
run: |
2024-02-22 21:48:02 +01:00
mv srcpkgs /home/runner && chown -R runner:runner /home/runner/srcpkgs
2024-02-22 22:03:05 +01:00
su - runner -c 'export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"; cd srcpkgs/hunspell-pl; abuild -r'
2024-01-31 02:45:17 +01:00
echo "/home/runner/packages/srcpkgs" >> /etc/apk/repositories
2024-02-22 22:03:05 +01:00
su - runner -c 'export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"; cd srcpkgs; for i in $(ls ./ | grep -v hunspell-pl); do cd $i && abuild -r; cd .. ; done'
- name: Mount and upload
run: |
2024-01-27 16:47:19 +01:00
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/*'
2024-02-22 21:48:02 +01:00
su - runner -c 'cp packages/srcpkgs/aarch64/* hole/latest-stable/main/aarch64/'
su - runner -c 'ls -lah /home/runner/hole/latest-stable/main/aarch64/'