sharenet/.forgejo/workflows/podman-demo.yml
continuist f11d5d11a7
Some checks failed
CI/CD Pipeline with Direct Podman Access / test-backend (push) Failing after 0s
Podman Rootless Demo / test-rootless (push) Failing after 15s
fix workflow #2
2025-09-18 21:50:51 -04:00

38 lines
No EOL
1.2 KiB
YAML

name: Podman Rootless Demo
on: [push, pull_request]
jobs:
test-rootless:
runs-on: [ci]
# Point all steps at the host's rootless Podman socket
env:
# Point the client at the mounted socket
CONTAINER_HOST: unix:///run/user/1001/podman/podman.sock
# Make sure podman looks in the correct runtime dir hierarchy
XDG_RUNTIME_DIR: /run/user/1001
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Debug socket perms
run: |
set -euo pipefail
id -u; id -g
ls -ld /run /run/user /run/user/1001 /run/user/1001/podman || true
ls -l /run/user/1001/podman || true
test -S /run/user/1001/podman/podman.sock
- name: Use host rootless Podman
run: |
set -euo pipefail
podman --remote info --format '{{.Host.RemoteSocket.Path}} (remote={{.Host.RemoteSocket.Exists}})'
podman --remote version
podman --remote run --rm alpine:3.20 echo "Hello from host rootless Podman!"
- name: Build and run a container
run: |
set -euo pipefail
podman --remote build -t test-image .
podman --remote run --rm test-image