feat: allow specifying image version when starting
All checks were successful
/ test (push) Successful in 38s

This commit is contained in:
Marc 2024-04-09 00:16:05 -04:00
parent 484f9931d2
commit 019188cd37
Signed by: marc
GPG key ID: 048E042F22B5DC79
4 changed files with 11 additions and 3 deletions

View file

@ -18,4 +18,4 @@ jobs:
- name: Authenticate with registry
run: podman login -u srv_container-registry -p ${{ secrets.REGISTRY_TOKEN }} ${{ env.CONTAINER_ADDRESS }}
- name: Push image
run: podman push container-registry:0 ${{ env.CONTAINER_ADDRESS }}/container-registry:${{ env.GITHUB_REF_NAME }}
run: podman push container-registry:local ${{ env.CONTAINER_ADDRESS }}/container-registry:${{ env.GITHUB_REF_NAME }}

View file

@ -2,6 +2,14 @@
Private container registry to organize self-hosted services.
## Usage
To start or restart the container:
```bash
IMAGE_VERSION=<image tag> ./start.sh
```
## Setting up service credentials
The `container-registry_auth` volume is pre-seeded with an empty `htpasswd` file that will hold the credentials for registry users.

View file

@ -1,7 +1,7 @@
#!/bin/bash
image_name=$(jq .service_name ./service.json -r)
image_version=0
image_version=local
podman build \
-t "$image_name:$image_version" \

View file

@ -2,7 +2,7 @@
service_name=$(jq .service_name ./service.json -r)
image_name=$service_name
image_version=0
image_version=${IMAGE_VERSION:-local}
auth_volume="$service_name"_auth
data_volume="$service_name"_data