Fix: Use node image with mounted docker socket
Some checks failed
Infrastructure Audit / audit (push) Failing after 1s
Some checks failed
Infrastructure Audit / audit (push) Failing after 1s
This commit is contained in:
@@ -6,15 +6,20 @@ jobs:
|
||||
audit:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: docker:cli # Використовуємо образ з Docker клієнтом!
|
||||
# Використовуємо образ, де точно є Node.js (щоб працював checkout)
|
||||
image: node:16-bullseye
|
||||
# Прокидаємо сокет хоста, щоб бачити реальні контейнери
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock # Даємо доступ до докера хоста
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
steps:
|
||||
- name: 📥 Check out repository
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: 🐍 Run Audit Script
|
||||
# Встановлюємо python прямо в docker контейнері
|
||||
- name: 🛠️ Setup Tools
|
||||
run: |
|
||||
apk add --no-cache python3
|
||||
python3 audit.py
|
||||
# Встановлюємо Docker CLI та Python
|
||||
apt-get update
|
||||
apt-get install -y docker.io python3
|
||||
|
||||
- name: 🐍 Run Audit Script
|
||||
run: python3 audit.py
|
||||
|
||||
Reference in New Issue
Block a user