Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exclude docker-stack-wait image from docker prune #32

Merged
merged 1 commit into from
Apr 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ jobs:
mkdir -p ~/.ssh
ssh-keyscan -t rsa -p 2222 127.0.0.1 >> ~/.ssh/known_hosts

- name: Run a container to verify that docker system prune will work
run: |
ssh -p 2222 [email protected] docker run --name debian debian:12
shell: bash

- name: Test
uses: ./action
with:
Expand All @@ -61,3 +66,24 @@ jobs:
exit 1
fi
shell: bash

- name: Check that docker-stack-wait image is still there
run: |
ssh -p 2222 [email protected] docker image inspect sudobmitch/docker-stack-wait:v0.2.5
shell: bash

- name: Check that the Debian container got removed
run: |
if ssh -p 2222 [email protected] docker container inspect debian; then
echo "Debian container was not cleaned up!"
exit 1
fi
shell: bash

- name: Check that the Debian image got removed
run: |
if ssh -p 2222 [email protected] docker image inspect debian:12; then
echo "Debian image was not cleaned up!"
exit 1
fi
shell: bash
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ runs:

- name: Cleaning up
run: |
docker system prune -af
docker system prune -af --filter 'label!=org.opencontainers.image.source=git://github.com/sudo-bmitch/docker-stack-wait.git' --filter 'label!=org.opencontainers.image.version=v0.2.5'
docker context remove --force target
shell: bash

Expand Down