CI Repo-pkgs 03 #15
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI Repo-pkgs 03 | |
on: | |
schedule: | |
- cron: '1 1 */16 * *' | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install dependencies | |
run: | | |
sudo apt-get update | |
sudo ln -sf /bin/bash /bin/sh | |
sudo apt-get install -y gh jq | |
- name: Create rootfs | |
run: | | |
sudo sed '$s/fn_compress_rootfs/#fn_compress_rootfs/' -i 2slackware2sb | |
sudo sh 2slackware2sb -c | |
- name: Compile packages | |
run: | | |
sudo mount -t proc proc /tmp/root.x86_64/proc | |
sudo mount -t sysfs sys /tmp/root.x86_64/sys | |
sudo mount -o bind /dev /tmp/root.x86_64/dev | |
sudo mkdir /tmp/root.x86_64/tmp/ports | |
sudo cp -a scripts/slackware/03-ports/* /tmp/root.x86_64/tmp/ports | |
sudo cp -a scripts/slackware/gen_repos_files.sh /tmp/root.x86_64/tmp/ | |
sudo cp -a scripts/slackware/genreprc /tmp/root.x86_64/tmp/ | |
sudo chroot /tmp/root.x86_64/ /bin/bash -c "cd /tmp/ports; for i in \$(ls); do cd \$i; crux2slack; cd OUTPUT; fetch it *; cd ..;cd ..; done" | |
sudo chroot /tmp/root.x86_64/ /bin/bash -c "mkdir /tmp/slackware/" | |
sudo chroot /tmp/root.x86_64/ /bin/bash -c "mv /tmp/ports/*/OUTPUT/*.t?z /tmp/slackware/" | |
sudo chroot /tmp/root.x86_64/ /bin/bash -c "cd /tmp; echo|yes|bash gen_repos_files.sh" | |
sudo umount /tmp/root.x86_64/{proc,sys,dev} | |
- name: Remove old release assets | |
run: | | |
gh release delete slackware-current-03 --repo $GITHUB_REPOSITORY --yes --cleanup-tag || true | |
- name: Create new release and upload assets | |
run: | | |
gh release create slackware-current-03 --repo $GITHUB_REPOSITORY /tmp/root.x86_64/tmp/slackware/* |