This commit is contained in:
@@ -11,6 +11,8 @@ on:
|
||||
env:
|
||||
REGISTRY_HOST: git.neosisyphus.com
|
||||
REGISTRY_IMAGE: git.neosisyphus.com/evol3d/evol-testbed
|
||||
# Optional. If this secret is not set, the workflow uses GITHUB_ACTOR.
|
||||
REGISTRY_USERNAME: ${{ secrets.REGISTRY_USERNAME }}
|
||||
|
||||
jobs:
|
||||
image:
|
||||
@@ -21,8 +23,18 @@ jobs:
|
||||
|
||||
- name: Log in to container registry
|
||||
run: |
|
||||
set -eu
|
||||
username="${REGISTRY_USERNAME:-${GITHUB_ACTOR:-}}"
|
||||
if [ -z "$username" ]; then
|
||||
echo "REGISTRY_USERNAME secret is empty and GITHUB_ACTOR is not set" >&2
|
||||
exit 1
|
||||
fi
|
||||
if [ -z "${{ secrets.REGISTRY_PASSWORD }}" ]; then
|
||||
echo "REGISTRY_PASSWORD secret is empty. Set it to a Gitea access token with package write permission." >&2
|
||||
exit 1
|
||||
fi
|
||||
echo "${{ secrets.REGISTRY_PASSWORD }}" | docker login "$REGISTRY_HOST" \
|
||||
-u "${{ secrets.REGISTRY_USERNAME }}" \
|
||||
-u "$username" \
|
||||
--password-stdin
|
||||
|
||||
- name: Build CI image
|
||||
|
||||
Reference in New Issue
Block a user