mirror of
https://github.com/docker/build-push-action.git
synced 2024-11-09 20:05:38 +01:00
Merge pull request #814 from jedevc/e2e-distribution
e2e: add distribution tests
This commit is contained in:
commit
d10433366f
5
.github/e2e/distribution/env
vendored
Normal file
5
.github/e2e/distribution/env
vendored
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
REGISTRY_FQDN=localhost:8080
|
||||||
|
REGISTRY_SLUG=localhost:8080/test-docker-action
|
||||||
|
|
||||||
|
DISTRIBUTION_HOST=localhost
|
||||||
|
DISTRIBUTION_PORT=8080
|
13
.github/e2e/distribution/install.sh
vendored
Executable file
13
.github/e2e/distribution/install.sh
vendored
Executable file
@ -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
.github/workflows/e2e.yml
vendored
6
.github/workflows/e2e.yml
vendored
@ -35,6 +35,10 @@ jobs:
|
|||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
|
-
|
||||||
|
name: Distribution
|
||||||
|
id: distribution
|
||||||
|
type: local
|
||||||
-
|
-
|
||||||
name: Docker Hub
|
name: Docker Hub
|
||||||
registry: ''
|
registry: ''
|
||||||
@ -169,7 +173,7 @@ jobs:
|
|||||||
network=host
|
network=host
|
||||||
-
|
-
|
||||||
name: Login to Registry
|
name: Login to Registry
|
||||||
if: github.event_name != 'pull_request'
|
if: github.event_name != 'pull_request' && env.REGISTRY_USER != ''
|
||||||
uses: docker/login-action@v2
|
uses: docker/login-action@v2
|
||||||
with:
|
with:
|
||||||
registry: ${{ env.REGISTRY_FQDN || matrix.registry }}
|
registry: ${{ env.REGISTRY_FQDN || matrix.registry }}
|
||||||
|
Loading…
Reference in New Issue
Block a user