1
0
mirror of https://github.com/tommytran732/Arch-Setup-Script synced 2024-09-19 15:14:43 -04:00
Arch-Setup-Script/.github/workflows/ISOBuilder.yml

60 lines
2.0 KiB
YAML
Raw Normal View History

2021-02-02 13:56:25 -05:00
name: ISOBuilder
2021-02-02 08:45:18 -05:00
# Controls when the action will run.
on:
2021-02-02 13:56:25 -05:00
# Triggers the workflow on push or pull request events for the main branch.
# Run workflow from the Action Tab.
2021-02-02 08:45:18 -05:00
workflow_dispatch:
jobs:
build:
# The type of runner that the job will run on
2021-02-02 08:55:10 -05:00
runs-on: ubuntu-20.04
2021-02-02 08:45:18 -05:00
2021-02-02 13:56:25 -05:00
# Steps represent a sequence of tasks that will be executed as part of the job.
2021-02-02 08:45:18 -05:00
steps:
2021-02-02 13:56:25 -05:00
# Makes my repo accessible.
2021-02-02 08:45:18 -05:00
- uses: actions/checkout@v2
2021-02-02 11:47:11 -05:00
- name: Downloading the latest Arch Linux ISO.
2021-02-02 13:29:39 -05:00
run: curl -sL http://mirrors.mit.edu/archlinux/iso/latest/archlinux-2021.02.01-x86_64.iso > archlinux.iso
2021-02-02 13:56:25 -05:00
2021-02-02 11:47:11 -05:00
- name: Installing mkisofs.
run: sudo apt-get install mkisofs -y
2021-02-02 13:56:25 -05:00
2021-02-02 11:47:11 -05:00
- name: Creating the ISO mountpoint.
2021-02-02 13:29:39 -05:00
run: sudo mkdir ~/archiso
2021-02-02 13:56:25 -05:00
2021-02-02 11:47:11 -05:00
- name: Mounting the ISO.
2021-02-02 12:29:37 -05:00
run: sudo mount archlinux.iso ~/archiso
2021-02-02 13:56:25 -05:00
2021-02-02 13:29:39 -05:00
- name: Copying the files from the ISO to a new folder.
run: sudo cp -r ~/archiso ~/archiso_new
2021-02-02 13:56:25 -05:00
2021-02-02 11:47:11 -05:00
- name: Extracting squashfs.
2021-02-02 13:29:39 -05:00
run: sudo unsquashfs ~/archiso_new/arch/x86_64/airootfs.sfs
2021-02-02 13:56:25 -05:00
2021-02-02 13:29:39 -05:00
- name: Setting up permissions.
run: sudo chmod +x ~/work/easy-arch/easy-arch/easy-arch.sh
2021-02-02 13:56:25 -05:00
2021-02-02 13:29:39 -05:00
- name: Copying easy-arch.sh script.
run: sudo cp ~/work/easy-arch/easy-arch/easy-arch.sh ~/work/easy-arch/easy-arch/squashfs-root/root
2021-02-02 13:56:25 -05:00
2021-02-02 13:29:39 -05:00
- name: Recreating squashfs.
run: sudo mksquashfs ~/work/easy-arch/easy-arch/squashfs-root ~/airootfs.sfs
2021-02-02 13:56:25 -05:00
2021-02-02 13:29:39 -05:00
- name: Removing the old airootfs.sfs.
run: sudo rm -rf ~/archiso_new/arch/x86_64/airootfs.sfs
2021-02-02 13:56:25 -05:00
2021-02-02 13:29:39 -05:00
- name: Copying the modified airootfs.sfs into the new ISO.
run: sudo mv ~/airootfs.sfs ~/archiso_new/arch/x86_64/
2021-02-02 13:56:25 -05:00
2021-02-02 13:29:39 -05:00
- name: Creating the new Arch Linux ISO.
2021-02-02 13:56:25 -05:00
run: sudo mkisofs -lJR -o archlinux_easy.iso ~/archiso_new/
2021-02-03 02:18:58 -05:00
- uses: actions/upload-artifact@v2
with:
2021-02-03 02:41:48 -05:00
name: archlinux_easy.iso
path: ~/work/easy-arch/easy-arch/archlinux_easy.iso