Skip to content

Commit

Permalink
Test podman
Browse files Browse the repository at this point in the history
  • Loading branch information
amezin committed Nov 5, 2024
1 parent 7d04fad commit ec14667
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/workflows/common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ jobs:
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{ github.repository }}
- uses: docker/build-push-action@v6
- id: docker_build
uses: docker/build-push-action@v6
with:
context: .
pull: true
Expand All @@ -43,3 +44,6 @@ jobs:
ghcr.io/${{ github.repository }}:master
${{ steps.docker_meta.outputs.tags }}
cache-to: type=inline
- run: >-
docker run --rm -v ./test.sh:/test.sh:ro --privileged --cgroupns=host
${{ steps.docker_build.outputs.imageid }} /test.sh
9 changes: 9 additions & 0 deletions test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash

set -ex

mount --make-rshared /
CGROUP="$(grep '^0::' /proc/self/cgroup)"
chown -R github-actions:github-actions "/sys/fs/cgroup${CGROUP#0::}"

sudo --preserve-env --set-home --user=github-actions -- podman run --rm alpine:latest true

0 comments on commit ec14667

Please sign in to comment.