ci: probe workspace visibility in a privileged container

This commit is contained in:
BlackAngelTV committed 2026-12-04 15:30:33 +01:00
1 parent 32af9aad8f
commit c704a72d3e
1 file changed
+16 -18
+16 -18
View File
@@ -8,25 +8,23 @@ jobs:
runs-on: arch-host
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- name: Probe
run: |
set +e
id
echo "PWD=$(pwd)"
echo "GITHUB_WORKSPACE=${GITHUB_WORKSPACE:-}"
ls -la "$PWD" | head
echo "--- sudo"
sudo -n true; echo "sudo_rc=$?"
echo "--- docker cli"
set -e
echo "PWD=$PWD"
ls | head
sudo pacman -Sy --needed --noconfirm --quiet docker
docker version 2>&1 | head -20
echo "--- images"
docker images --format '{{.Repository}}:{{.Tag}}' 2>&1 | head
echo "--- privileged container with workspace bind mount"
docker run --rm --privileged -v "$PWD:$PWD" -w "$PWD" archlinux:latest sh -c '
id
mount -t tmpfs tmpfs /mnt && echo MOUNT_OK; umount /mnt
ls -l /dev/loop-control /dev/loop0 2>&1
echo "workspace files:"; ls | head
' 2>&1
echo "rc=$?"
ls | head
test -f release.sh && echo REPO_VISIBLE
'
echo marker > from-job.txt
docker run --rm --privileged -v "$PWD:$PWD" -w "$PWD" archlinux:latest sh -c '
cat from-job.txt && echo READ_BACK_OK
echo from-container > from-container.txt
'
echo "--- back in job"
cat from-container.txt
rm -f from-job.txt from-container.txt