From 609fbd49b34dd2eff07da404cfa2970a9f371df2 Mon Sep 17 00:00:00 2001 From: Cappy Ishihara Date: Mon, 30 Dec 2024 00:10:15 +0700 Subject: [PATCH] oops, wrong file --- .github/workflows/katsu-live-iso.yml | 101 +++++++++++++-------------- .github/workflows/katsu.yml | 59 +--------------- 2 files changed, 52 insertions(+), 108 deletions(-) diff --git a/.github/workflows/katsu-live-iso.yml b/.github/workflows/katsu-live-iso.yml index 4675588..d96be98 100644 --- a/.github/workflows/katsu-live-iso.yml +++ b/.github/workflows/katsu-live-iso.yml @@ -85,62 +85,59 @@ on: jobs: live-iso: - uses: ./.github/workflows/katsu-live-iso.yml - with: - variant: ${{ inputs.variant }} - # strategy: - # matrix: - # arch: [x86_64, aarch64] - # fail-fast: false - # runs-on: ${{ matrix.arch == 'x86_64' && 'ubuntu-latest' || 'arm64' }} - # container: - # image: ghcr.io/terrapkg/builder:f41 - # options: --privileged -v /dev:/dev - # steps: - # - name: Install dependencies - # run: | - # dnf up -y - # dnf install -y $DNF_PKGS - # dnf clean all - # - name: Checkout - # uses: actions/checkout@v4 + strategy: + matrix: + arch: [x86_64, aarch64] + fail-fast: false + runs-on: ${{ matrix.arch == 'x86_64' && 'ubuntu-latest' || 'arm64' }} + container: + image: ghcr.io/terrapkg/builder:f41 + options: --privileged -v /dev:/dev + steps: + - name: Install dependencies + run: | + dnf up -y + dnf install -y $DNF_PKGS + dnf clean all + - name: Checkout + uses: actions/checkout@v4 - # - name: Sanitize artifact name - # run: | - # name=$(echo ${{ inputs.variant }} | sed 's/\//-/g') - # name=$name-${{ inputs.arch }} + - name: Sanitize artifact name + run: | + name=$(echo ${{ inputs.variant }} | sed 's/\//-/g') + name=$name-${{ inputs.arch }} - # # set github variable - # echo artifact=$name-${{ inputs.arch }}-live >> $GITHUB_ENV - # # Get architecture - # # e.g. flagship/flagship-live -> flagship - # echo variant=$(echo ${{ inputs.variant }} | cut -d'/' -f1) >> $GITHUB_ENV + # set github variable + echo artifact=$name-${{ inputs.arch }}-live >> $GITHUB_ENV + # Get architecture + # e.g. flagship/flagship-live -> flagship + echo variant=$(echo ${{ inputs.variant }} | cut -d'/' -f1) >> $GITHUB_ENV - # - name: Build Live ISO - # run: | - # # loop device fix - # if [ "$(df -T /dev | tail -1 |cut -f 1 -d ' ')" = "tmpfs" ]; then - # mount -t devtmpfs none /dev - # fi + - name: Build Live ISO + run: | + # loop device fix + if [ "$(df -T /dev | tail -1 |cut -f 1 -d ' ')" = "tmpfs" ]; then + mount -t devtmpfs none /dev + fi - # rm -rf /etc/rpm/macros.image-language-conf - # chcon system_u:object_r:install_exec_t:s0 "$(which katsu)" - # pushd katsu - # KATSU_KEEP_CHROOT=1 KATSU_LOG=trace katsu -v --output=iso "modules/${{ matrix.variant }}/${{ matrix.variant }}-live.yaml" - # # get the ISO name, and then append the arch - # # e.g. flagship-live.iso -> flagship-live-x86_64.iso + rm -rf /etc/rpm/macros.image-language-conf + chcon system_u:object_r:install_exec_t:s0 "$(which katsu)" + pushd katsu + KATSU_KEEP_CHROOT=1 KATSU_LOG=trace katsu -v --output=iso "modules/${{ matrix.variant }}/${{ matrix.variant }}-live.yaml" + # get the ISO name, and then append the arch + # e.g. flagship-live.iso -> flagship-live-x86_64.iso - # # get the ISO name - # iso=$(ls *.iso) - # # append the arch - # mv $iso $(echo $iso | sed "s/.iso/-${{ matrix.arch }}.iso/") + # get the ISO name + iso=$(ls *.iso) + # append the arch + mv $iso $(echo $iso | sed "s/.iso/-${{ matrix.arch }}.iso/") - # rm -rf katsu-work/ - # popd + rm -rf katsu-work/ + popd - # - name: Upload Artifact - # uses: actions/upload-artifact@v4 - # with: - # name: ${{ env.artifact }}-iso - # path: katsu/*.iso - # compression-level: 0 + - name: Upload Artifact + uses: actions/upload-artifact@v4 + with: + name: ${{ env.artifact }}-iso + path: katsu/*.iso + compression-level: 0 diff --git a/.github/workflows/katsu.yml b/.github/workflows/katsu.yml index 872bb1e..58792e5 100644 --- a/.github/workflows/katsu.yml +++ b/.github/workflows/katsu.yml @@ -133,59 +133,6 @@ jobs: compression-level: 0 live-iso: - strategy: - matrix: - arch: [x86_64, aarch64] - fail-fast: false - runs-on: ${{ matrix.arch == 'x86_64' && 'ubuntu-latest' || 'arm64' }} - container: - image: ghcr.io/terrapkg/builder:f41 - options: --privileged -v /dev:/dev - steps: - - name: Install dependencies - run: | - dnf up -y - dnf install -y $DNF_PKGS - dnf clean all - - name: Checkout - uses: actions/checkout@v4 - - - name: Sanitize artifact name - run: | - name=$(echo ${{ inputs.variant }} | sed 's/\//-/g') - name=$name-${{ inputs.arch }} - - # set github variable - echo artifact=$name-${{ inputs.arch }}-live >> $GITHUB_ENV - # Get architecture - # e.g. flagship/flagship-live -> flagship - echo variant=$(echo ${{ inputs.variant }} | cut -d'/' -f1) >> $GITHUB_ENV - - - name: Build Live ISO - run: | - # loop device fix - if [ "$(df -T /dev | tail -1 |cut -f 1 -d ' ')" = "tmpfs" ]; then - mount -t devtmpfs none /dev - fi - - rm -rf /etc/rpm/macros.image-language-conf - chcon system_u:object_r:install_exec_t:s0 "$(which katsu)" - pushd katsu - KATSU_KEEP_CHROOT=1 KATSU_LOG=trace katsu -v --output=iso "modules/${{ inputs.variant }}-live.yaml" - # get the ISO name, and then append the arch - # e.g. flagship-live.iso -> flagship-live-x86_64.iso - - # get the ISO name - iso=$(ls *.iso) - # append the arch - mv $iso $(echo $iso | sed "s/.iso/-${{ matrix.arch }}.iso/") - - rm -rf katsu-work/ - popd - - - name: Upload Artifact - uses: actions/upload-artifact@v4 - with: - name: ${{ env.artifact }}-iso - path: katsu/*.iso - compression-level: 0 + uses: ./.github/workflows/katsu-live-iso.yml + with: + variant: ${{ inputs.variant }}