Skip to content

Commit

Permalink
Refactored podman_install
Browse files Browse the repository at this point in the history
  • Loading branch information
cezmunsta committed Feb 1, 2024
1 parent 0c84405 commit 8f6fe81
Showing 1 changed file with 15 additions and 14 deletions.
29 changes: 15 additions & 14 deletions .github/workflows/pr-go.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,21 +25,22 @@ jobs:
with:
egress-policy: audit

- if: ${{ runner.os }} == "Linux"
name: Prepare OS
id: podman_install_linux
- name: Prepare OS
id: podman_install
run: |
sudo apt update -qqy
sudo apt install -qqy podman
systemctl --user start podman
echo "DOCKER_HOST=unix:///run/user/$UID/podman/podman.sock" >> "$GITHUB_ENV"
- if: ${{ runner.os }} == "macOS"
name: Prepare OS
id: podman_install_macos
run: |
sudo brew install podman
echo "DOCKER_HOST=unix://$(podman machine inspect --format '{{.ConnectionInfo.PodmanSocket.Path}}' >)" >> "$GITHUB_ENV"
case "${{ runner.os }}" in
"macOS")
sudo brew install podman
echo "DOCKER_HOST=unix://$(podman machine inspect --format '{{.ConnectionInfo.PodmanSocket.Path}}' >)" >> "$GITHUB_ENV"
;;
"Linux")
sudo apt update -qqy
sudo apt install -qqy podman
systemctl --user start podman
echo "DOCKER_HOST=unix:///run/user/$UID/podman/podman.sock" >> "$GITHUB_ENV"
;;
\*) exit 1
esac
- name: Prepare Go
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
Expand Down

0 comments on commit 8f6fe81

Please sign in to comment.