Skip to content

Commit

Permalink
new approach
Browse files Browse the repository at this point in the history
Signed-off-by: Brian DeHamer <[email protected]>
  • Loading branch information
bdehamer committed Jan 11, 2024
1 parent adea404 commit 0aa61e0
Showing 1 changed file with 21 additions and 14 deletions.
35 changes: 21 additions & 14 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,17 @@ jobs:
contents: read
id-token: write
packages: write
services:
registry:
image: registry@sha256:860f379a011eddfab604d9acfe3cf50b2d6e958026fb0f977132b0b083b1a3d7 # 2.8.3
volumes:
- ${{ runner.temp }}/registry:/auth
ports:
- 5000:5000
env:
REGISTRY_AUTH: htpasswd
REGISTRY_AUTH_HTPASSWD_REALM: Registry Realm
REGISTRY_AUTH_HTPASSWD_PATH: /auth/htpasswd
#services:
#registry:
#image: registry@sha256:860f379a011eddfab604d9acfe3cf50b2d6e958026fb0f977132b0b083b1a3d7 # 2.8.3
#volumes:
#- ${{ runner.temp }}/registry:/auth
#ports:
#- 5000:5000
#env:
#REGISTRY_AUTH: htpasswd
#REGISTRY_AUTH_HTPASSWD_REALM: Registry Realm
#REGISTRY_AUTH_HTPASSWD_PATH: /auth/htpasswd
env:
REGISTRY: localhost:5000
IMAGE_NAME: test
Expand All @@ -36,9 +36,16 @@ jobs:
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: htpasswd
run: |
mkdir ${{ runner.temp }}/registry
npx htpasswd --bcrypt --batch --nofile user pass > ${{ runner.temp }}/registry/htpasswd
docker restart ${{ job.services.registry.id }}
npx htpasswd --bcrypt --batch --nofile user pass > ${{ runner.temp }}/htpasswd
docker run -d \
--network ${{ job.container.network }} \
-p 5000:5000 \
-e "REGISTRY_AUTH=htpasswd" \
-e "REGISTRY_AUTH_HTPASSWD_REALM=Registry Realm" \
-e "REGISTRY_AUTH_HTPASSWD_PATH=/auth/htpasswd" \
-v "${{ runner.tmp }}/htpasswd:/auth/htpasswd" \
registry@sha256:860f379a011eddfab604d9acfe3cf50b2d6e958026fb0f977132b0b083b1a3d7
docker ps -a
- name: Build Dockerfile
run: |
cat <<EOF > Dockerfile
Expand Down

0 comments on commit 0aa61e0

Please sign in to comment.