Skip to content

Commit b713aba

Browse files
committed
Move wait on to another the same step as running registry
1 parent 21d67a0 commit b713aba

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

.github/workflows/dockerimage.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ jobs:
3838
with:
3939
path: /tmp/docker-registry
4040
key: docker-registry-no-buildkit-${{ hashFiles('Dockerfile') }}
41-
- run: docker run -d -p 5000:5000 --restart=always --name registry -v /tmp/docker-registry:/var/lib/registry registry:2
42-
- run: npx wait-on tcp:5000 && docker pull localhost:5000/thing || true
41+
- run: docker run -d -p 5000:5000 --restart=always --name registry -v /tmp/docker-registry:/var/lib/registry registry:2 && npx wait-on tcp:5000
42+
- run: docker pull localhost:5000/thing || true
4343
- run: docker build . -t thing --cache-from=localhost:5000/thing
4444
- run: docker tag thing localhost:5000/thing && docker push localhost:5000/thing || true
4545
if: steps.cache.outputs.cache-hit != 'true'
@@ -54,8 +54,7 @@ jobs:
5454
with:
5555
path: /tmp/docker-registry
5656
key: docker-registry-buildkit-${{ hashFiles('Dockerfile') }}
57-
- run: docker run -d -p 5000:5000 --restart=always --name registry -v /tmp/docker-registry:/var/lib/registry registry:2
58-
- run: npx wait-on tcp:5000
57+
- run: docker run -d -p 5000:5000 --restart=always --name registry -v /tmp/docker-registry:/var/lib/registry registry:2 && npx wait-on tcp:5000
5958
- run: docker build . -t thing --cache-from=localhost:5000/thing --build-arg BUILDKIT_INLINE_CACHE=1
6059
- run: docker tag thing localhost:5000/thing && docker push localhost:5000/thing || true
6160
if: steps.cache.outputs.cache-hit != 'true'

0 commit comments

Comments
 (0)