Skip to content

Commit

Permalink
ci: spilt make rootfs tarball to prepare
Browse files Browse the repository at this point in the history
Signed-off-by: Han Gao <[email protected]>
  • Loading branch information
RevySR committed Mar 23, 2024
1 parent 484d19c commit 67223e2
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ env:
jobs:
prepare:
runs-on: ubuntu-22.04
env:
CREATE_TARBALL: common_revyos_rootfs.tar
steps:
- name: Install Software
run: |
Expand Down Expand Up @@ -56,6 +58,22 @@ jobs:
name: qemu-riscv64-static-ci
path: /usr/bin/qemu-riscv64-static

- name: Checkout Repo
uses: actions/checkout@v4
with:
path: 'mkimg-th1520' # TODO: make this name a global variable

- name: Make rootfs tarball
run: |
pushd mkimg-th1520
sudo -E ./mkrootfs.sh
popd
- uses: actions/upload-artifact@v3
with:
name: common_revyos_rootfs
path: ${{ env.CREATE_TARBALL }}

mkrootfs:
needs: prepare
strategy:
Expand Down Expand Up @@ -108,6 +126,7 @@ jobs:
sudo chmod a+x /usr/bin/qemu-riscv64-static
ls -al /usr/bin/qemu-riscv64-static
sudo dpkg-reconfigure binfmt-support
echo "USE_TARBALL=${ARTIFACTS_DIR}/common_revyos_rootfs/common_revyos_rootfs.tar" >> $GITHUB_ENV
- name: Checkout Repo
uses: actions/checkout@v4
Expand Down
4 changes: 2 additions & 2 deletions mkrootfs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ calculate_md5()

main()
{
if [ "$1" = "rootfs" ]; then
make_rootfs_tarball $2
if [ ! -z "${CREATE_TARBALL}" ]; then
make_rootfs_tarball ${CREATE_TARBALL}
exit 0
fi

Expand Down

0 comments on commit 67223e2

Please sign in to comment.