Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wip #85

Closed
wants to merge 13 commits into from
Closed

wip #85

Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 30 additions & 5 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,25 +15,50 @@ jobs:
contents: read
id-token: write
packages: write
services:
registry:
image: registry@sha256:860f379a011eddfab604d9acfe3cf50b2d6e958026fb0f977132b0b083b1a3d7 # 2.8.3
ports:
- 5000:5000
#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
IMAGE_TAG: latest
USERNAME: ${{ github.actor }}
PASSWORD: password
steps:
- name: Checkout
id: checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: htpasswd
run: |
npx htpasswd --bcrypt --batch --nofile $USERNAME $PASSWORD > ${{ runner.temp }}/htpasswd
docker run -d \
-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
FROM scratch
COPY README.md .
EOF
- name: Login to GHCR
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0
with:
registry: ${{ env.REGISTRY }}
username: ${{ env.USERNAME }}
password: ${{ env.PASSWORD }}
- name: Build and push container image
id: push
uses: docker/build-push-action@4a13e500e55cf31b7a5d59a38ab2040ab0f42f56 # v5.1.0
Expand Down
Loading