Skip to content

Commit

Permalink
If build fails, don't want to test the pwncollege/dojo image, so use …
Browse files Browse the repository at this point in the history
…a different tag
  • Loading branch information
adamdoupe committed Sep 1, 2023
1 parent b385fdc commit 5663061
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,15 @@ jobs:
file: Dockerfile
# Set the desired build target here
push: false
tags: pwncollege/dojo
load: true # we want this tag to be loaded to docker images
tags: dojo-test
cache-from: type=local,src=/tmp/.buildx-cache
# Note the mode=max here
# More: https://github.com/moby/buildkit#--export-cache-options
# And: https://github.com/docker/buildx#--cache-tonametypetypekeyvalue
cache-to: type=local,mode=max,dest=/tmp/.buildx-cache-new
- name: Run Container
run: "docker run --privileged -d -v $PWD:/opt/pwn.college:shared -p 2222:22 -p 80:80 -p 443:443 --name dojo pwncollege/dojo"
run: "docker run --privileged -d -v $PWD:/opt/pwn.college:shared -p 2222:22 -p 80:80 -p 443:443 --name dojo dojo-test"
- name: Wait for container to be ready
run: |
until docker exec dojo dojo is-setup-finished
Expand Down

0 comments on commit 5663061

Please sign in to comment.