Skip to content

Commit

Permalink
Merge pull request #814 from jedevc/e2e-distribution
Browse files Browse the repository at this point in the history
e2e: add distribution tests
  • Loading branch information
jedevc committed Feb 22, 2023
2 parents 7944f9a + ee5cabd commit d104333
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .github/e2e/distribution/env
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
REGISTRY_FQDN=localhost:8080
REGISTRY_SLUG=localhost:8080/test-docker-action

DISTRIBUTION_HOST=localhost
DISTRIBUTION_PORT=8080
13 changes: 13 additions & 0 deletions .github/e2e/distribution/install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/usr/bin/env bash
set -eu

: "${DISTRIBUTION_VERSION:=registry:2}"
: "${DISTRIBUTION_HOST:=localhost}"
: "${DISTRIBUTION_PORT:=8080}"

echo "::group::Starting ${DISTRIBUTION_VERSION}}"
(
set -x
docker run -d --name registry -p "5000:${DISTRIBUTION_PORT}" "${DISTRIBUTION_VERSION}"
)
echo "::endgroup::"
6 changes: 5 additions & 1 deletion .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ jobs:
fail-fast: false
matrix:
include:
-
name: Distribution
id: distribution
type: local
-
name: Docker Hub
registry: ''
Expand Down Expand Up @@ -169,7 +173,7 @@ jobs:
network=host
-
name: Login to Registry
if: github.event_name != 'pull_request'
if: github.event_name != 'pull_request' && env.REGISTRY_USER != ''
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY_FQDN || matrix.registry }}
Expand Down

0 comments on commit d104333

Please sign in to comment.