From ea9b5c9b2188884febf19b5f38f2211299dd6c93 Mon Sep 17 00:00:00 2001 From: Sohrab Behdani Date: Tue, 23 Jul 2024 11:45:45 +0330 Subject: [PATCH] added plasma edition --- .github/workflows/build.yml | 72 +++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..f1e97e2 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,72 @@ +# Adapted from https://github.com/andrewboring/alarm-images/blob/master/.github/workflows/build.yml + +name: Build Images + +on: + release: + types: + - created + +env: + api_key: ${{ secrets.GITHUB_TOKEN }} + name: ${{ github.event.repository.name }} + release_name: ${{ github.ref_name }} + GH_TOKEN: ${{ github.token }} + +jobs: + build: + permissions: + contents: write + runs-on: ubuntu-latest + strategy: + matrix: + arch: ['aarch64', 'rpi-aarch64'] + flavor: ['barebone'] + include: + - arch: rpi-aarch64 + flavor: plasma + - arch: rpi-aarch64 + flavor: xfce + - arch: rpi-aarch64 + flavor: trinity + + + + steps: + - uses: actions/checkout@v3 + - name: Configure Git user + run: | + git config --global user.name "github-actions[bot]" + git config --global user.email "github-actions[bot]@users.noreply.github.com" + - name: Install dependencies + run: sudo apt-get update && sudo apt-get install -y parted wget dosfstools zip arch-install-scripts aria2 gh git + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + with: + platforms: arm,arm64 + - name: Build image + shell: bash + run: | + scripts=() + for script_name in "${{ matrix.arch }}" "${{ matrix.flavor }}" "${{ matrix.arch }}-${{ matrix.flavor }}"; do + script_path="setup/$script_name" + if [ -f "$script_path" ]; then + scripts+=("$script_path") + fi + done + sudo ./create-image 8G ${{ matrix.arch }} "${scripts[@]}" + - name: Rename image + id: rename-image + run: | + image_in_name="archlinux-${{ matrix.arch }}.img" + image_out_name="Parchlinux-${{ matrix.arch }}-${{ matrix.flavor }}-$(date '+%Y-%m-%d').img" + mv "$image_in_name" "$image_out_name" + echo "image_name=$image_out_name" >> "$GITHUB_OUTPUT" + - name: Compress image + run: | + mkdir image_parts + zip -r "image_parts/${{ steps.rename-image.outputs.image_name }}.zip" "${{ steps.rename-image.outputs.image_name }}" + - name: Upload image + run: | + sha256sum image_parts/* > image_parts/sha256sums.${{ matrix.arch }}.${{ matrix.flavor }}.txt + gh release upload ${{ github.event.release.tag_name }} ./image_parts/* -R ${{ github.repository }}