From 154a25777a1517bd1640c90271f100f4c05792dc Mon Sep 17 00:00:00 2001 From: Cappy Ishihara Date: Mon, 30 Dec 2024 00:09:26 +0700 Subject: [PATCH] How many levels can you nest a GHA workflow call? --- .github/workflows/katsu-live-iso.yml | 101 ++++++++++++++------------- 1 file changed, 52 insertions(+), 49 deletions(-) diff --git a/.github/workflows/katsu-live-iso.yml b/.github/workflows/katsu-live-iso.yml index d96be98..4675588 100644 --- a/.github/workflows/katsu-live-iso.yml +++ b/.github/workflows/katsu-live-iso.yml @@ -85,59 +85,62 @@ on: jobs: 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 + 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 - - 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