fix image ci job
This commit is contained in:
2 files changed
+14
-3
No files matched your search
@@ -29,9 +29,20 @@ jobs:
|
|||||||
run: docker version
|
run: docker version
|
||||||
|
|
||||||
- name: Log in to the Gitea registry
|
- name: Log in to the Gitea registry
|
||||||
|
env:
|
||||||
|
# The username is only needed to pair with the token. Default it to the
|
||||||
|
# repository owner — the same account the image namespace belongs to —
|
||||||
|
# so a missing REGISTRY_USER secret does not fail the job with docker's
|
||||||
|
# unhelpful "username is empty".
|
||||||
|
REGISTRY_USER: ${{ secrets.REGISTRY_USER || github.repository_owner }}
|
||||||
|
REGISTRY_TOKEN: ${{ secrets.REGISTRY_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
echo "${{ secrets.REGISTRY_TOKEN }}" \
|
if [ -z "$REGISTRY_USER" ] || [ -z "$REGISTRY_TOKEN" ]; then
|
||||||
| docker login "$REGISTRY" -u "${{ secrets.REGISTRY_USER }}" --password-stdin
|
echo "::error::Container registry credentials are missing. Set REGISTRY_TOKEN (a token with package:write) under Settings → Actions → Secrets; REGISTRY_USER is optional and defaults to the repository owner."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
printf '%s' "$REGISTRY_TOKEN" \
|
||||||
|
| docker login "$REGISTRY" -u "$REGISTRY_USER" --password-stdin
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
@@ -299,7 +299,7 @@ Secrets, all under *Repository → Settings → Actions → Secrets*:
|
|||||||
|
|
||||||
| Secret | For |
|
| Secret | For |
|
||||||
| --- | --- |
|
| --- | --- |
|
||||||
| `REGISTRY_USER`, `REGISTRY_TOKEN` | pushing to the Gitea registry (a token with `package:write`) |
|
| `REGISTRY_TOKEN` | pushing to the Gitea registry (a token with `package:write`); `REGISTRY_USER` is optional and defaults to the repository owner |
|
||||||
| `KADENCE_KEYSTORE_BASE64` | `base64 -w0 your.keystore` |
|
| `KADENCE_KEYSTORE_BASE64` | `base64 -w0 your.keystore` |
|
||||||
| `KADENCE_KEYSTORE_PASSWORD`, `KADENCE_KEY_ALIAS`, `KADENCE_KEY_PASSWORD` | the key inside it |
|
| `KADENCE_KEYSTORE_PASSWORD`, `KADENCE_KEY_ALIAS`, `KADENCE_KEY_PASSWORD` | the key inside it |
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user