mirror of
https://github.com/kernelkit/infix.git
synced 2026-07-30 04:33:00 +02:00
.github: clean up unused containers and images before starting
Error: error creating container storage: the container name "infamy0" is already in use by "2011c2d7cb1737b788b854a8bd08e519f3cbd6e36dae4975784978cff1f238fc". You have to remove that container to be able to reuse that name.: that name is already in use make[1]: *** [/home/github-runner/actions-runner/_work/infix/infix/test/test.mk:6: test-unit] Error 125 Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
@@ -22,6 +22,9 @@ jobs:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: 'true'
|
||||
- name: Clean up cruft ...
|
||||
run: |
|
||||
./test/env -c
|
||||
- name: Set Build Variables
|
||||
id: vars
|
||||
run: |
|
||||
|
||||
@@ -15,6 +15,10 @@ usage: test/env [<OPTS>] -f <IMAGE> -q <QENETH-DIR> <COMMAND> [<ARGS>...]
|
||||
|
||||
Options:
|
||||
|
||||
-c
|
||||
Clean up cruft, lingering images, old containers, unused volumes.
|
||||
Used by GitHub action to prevent issues with runnign tests.
|
||||
|
||||
-C
|
||||
Don't containerize the command, run it directly in the current
|
||||
namespaces
|
||||
@@ -104,8 +108,14 @@ name()
|
||||
containerize=yes
|
||||
[ -c /dev/kvm ] && kvm="--device=/dev/kvm"
|
||||
|
||||
while getopts "Cf:hiKp:q:t:" opt; do
|
||||
while getopts "cCf:hiKp:q:t:" opt; do
|
||||
case ${opt} in
|
||||
c)
|
||||
$(runner) image prune -af
|
||||
$(runner) volume prune -f
|
||||
$(runner) container prune -f
|
||||
exit 0
|
||||
;;
|
||||
C)
|
||||
containerize=
|
||||
;;
|
||||
|
||||
Reference in New Issue
Block a user