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

39 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: /tmp
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Verify socket visibility
run: |
set -euo pipefail
id -u; id -g
ls -ld /run/user/1001/podman
ls -l /run/user/1001/podman/podman.sock
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