linux_void/.gitea/workflows/release_amd64.yml

54 lines
3.1 KiB
YAML
Raw Normal View History

2024-01-27 16:06:25 +01:00
name: 'Release xbps for amd64'
on:
push:
branches:
- release
jobs:
compilation-amd64:
runs-on: void-glibc-current-pv
steps:
- name: Update xbps tool
shell: sh
run: xbps-install -Su xbps -y
- name: Update utilities
shell: sh
run: xbps-install -Su -y
- name: Install needed tools
shell: sh
run: xbps-install -Su nodejs bash git wget curl fuse-sshfs -y
- name: Import ITmodulo repo
run: |
echo 'repository=https://static.itmodulo.eu/dl/repo/void' > /etc/xbps.d/itmodulo.conf
cd /var/db/xbps/keys
wget "https://static.itmodulo.eu/dl/repo/public_keys/void/0e:7e:cc:e6:2b:a7:7b:ee:31:33:5c:5d:35:be:43:64.plist"
xbps-install -Su -y
- name: Checkout
uses: actions/checkout@v3
- name: Compile in sequence and upload
run: |
echo "user_allow_other" >> /etc/fuse.conf
groupadd -g 1001 runner
useradd runner -u 1001 -g 1001
su - runner -c 'git clone --depth 1 https://github.com/void-linux/void-packages.git'
su - runner -c 'cd void-packages && ./xbps-src binary-bootstrap'
mv srcpkgs /home/runner && chown runner:runner /home/runner/srcpkgs
mv shlibs_local /home/runner && chown runner:runner /home/runner/shlibs_local
su - runner -c 'cp -r srcpkgs/* void-packages/srcpkgs'
su - runner -c 'cd void-packages && echo "repository=https://static.itmodulo.eu/dl/repo/void" >> etc/xbps.d/repos-remote.conf && cp /var/db/xbps/keys/0e\:7e\:cc\:e6\:2b\:a7\:7b\:ee\:31\:33\:5c\:5d\:35\:be\:43\:64.plist masterdir/var/db/xbps/keys'
su - runner -c 'cat shlibs_local >> void-packages/common/shlibs'
su - runner -c 'cd void-packages && for i in $(ls ../srcpkgs/ | grep -v "\-doc" | grep -v "\-devel" | grep -v "lv2\-rnnoise" | grep -v "lxvst\-rnnoise" | grep -v "vst3\-rnnoise") ; do ./xbps-src pkg $i; done'
rm /home/runner/void-packages/hostdir/binpkgs/x86_64-repodata
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'
su - runner -c 'rm -rf hole/*.xbps*'
su - runner -c 'rm -rf hole/*.sig2'
su - runner -c 'xbps-rindex -c /home/runner/hole'
su - runner -c 'cp void-packages/hostdir/binpkgs/* hole/'
echo "${{ secrets.REPO_PRIVKEY }}" > /home/runner/private.pem && chown runner:runner /home/runner/private.pem
su - runner -c 'xbps-rindex -a /home/runner/hole/*.xbps'
su - runner -c 'xbps-rindex --privkey private.pem --sign --signedby "ITmodulo <itmodulo.eu>" /home/runner/hole'
su - runner -c 'xbps-rindex --privkey private.pem --sign-pkg hole/*.xbps'