Explain missing registry secrets before publishing
This commit is contained in:
@@ -60,6 +60,23 @@ jobs:
|
||||
DOCKER_BUILD_SUMMARY: "false"
|
||||
DOCKER_BUILD_RECORD_UPLOAD: "false"
|
||||
steps:
|
||||
- name: Validate registry credentials
|
||||
shell: bash
|
||||
env:
|
||||
REGISTRY_USERNAME: ${{ secrets.REGISTRY_USERNAME }}
|
||||
REGISTRY_TOKEN: ${{ secrets.REGISTRY_TOKEN }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
missing=0
|
||||
if [ -z "${REGISTRY_USERNAME:-}" ]; then
|
||||
echo "::error::Missing Actions secret REGISTRY_USERNAME. Set it in Repository Settings > Actions > Secrets to the Gitea username that owns REGISTRY_TOKEN."
|
||||
missing=1
|
||||
fi
|
||||
if [ -z "${REGISTRY_TOKEN:-}" ]; then
|
||||
echo "::error::Missing Actions secret REGISTRY_TOKEN. Set it in Repository Settings > Actions > Secrets to a Gitea personal access token with write:package permission. Actions Variables and runner environment variables do not populate secrets.REGISTRY_TOKEN."
|
||||
missing=1
|
||||
fi
|
||||
exit "$missing"
|
||||
- name: Checkout release
|
||||
uses: https://github.com/actions/checkout@v4
|
||||
with:
|
||||
|
||||
Reference in New Issue
Block a user