27 lines
No EOL
790 B
YAML
27 lines
No EOL
790 B
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:
|
|
CONTAINER_HOST: unix:///run/user/1001/podman/podman.sock
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- 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 |