Skip to content
This repository was archived by the owner on May 3, 2023. It is now read-only.

Commit 1358b94

Browse files
committed
Workflows: Mount bind /tmp to GITHUB_WORKSPACE
1 parent 8ffb096 commit 1358b94

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

.github/workflows/build-rpi4-lean-openwrt-new.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -199,19 +199,20 @@ jobs:
199199
sudo rm -f /mnt/swapfile
200200
export ROOT_FREE_KB=$(df --block-size=1024 --output=avail / | tail -1)
201201
export ROOT_LOOP_KB=$(expr $ROOT_FREE_KB - 1048576)
202-
# export ROOT_LOOP_BYTES=$(expr $ROOT_LOOP_KB \* 1024)
203-
# sudo fallocate -l $ROOT_LOOP_BYTES /root.img
204-
sudo truncate -s $ROOT_LOOP_KB /root.img
202+
export ROOT_LOOP_BYTES=$(expr $ROOT_LOOP_KB \* 1024)
203+
sudo fallocate -l $ROOT_LOOP_BYTES /root.img
205204
export ROOT_LOOP_DEVNAME=$(sudo losetup -f -P --show /root.img)
206205
export MNT_FREE_KB=$(df --block-size=1024 --output=avail /mnt | tail -1)
207206
export MNT_LOOP_KB=$(expr $MNT_FREE_KB - 102400)
208-
# export MNT_LOOP_BYTES=$(expr $MNT_LOOP_KB \* 1024)
209-
# sudo fallocate -l $MNT_LOOP_BYTES /mnt/mnt.img
210-
sudo truncate -s $MNT_LOOP_KB /mnt/mnt.img
207+
export MNT_LOOP_BYTES=$(expr $MNT_LOOP_KB \* 1024)
208+
sudo fallocate -l $MNT_LOOP_BYTES /mnt/mnt.img
211209
export MNT_LOOP_DEVNAME=$(sudo losetup -f -P --show /mnt/mnt.img)
212210
sudo mkfs.btrfs -f -d raid0 -L combinedisk $ROOT_LOOP_DEVNAME $MNT_LOOP_DEVNAME
213211
sudo mount -o nossd,compress=zstd $ROOT_LOOP_DEVNAME $GITHUB_WORKSPACE
214212
sudo chown -R runner:runner $GITHUB_WORKSPACE
213+
sudo mkdir $GITHUB_WORKSPACE/tmp
214+
sudo cp -rp /tmp/* $GITHUB_WORKSPACE/tmp
215+
sudo mount -B $GITHUB_WORKSPACE/tmp /tmp
215216
df -hT $GITHUB_WORKSPACE
216217
sudo btrfs filesystem usage $GITHUB_WORKSPACE
217218

0 commit comments

Comments
 (0)