Add FORGEJO_REGISTRY_TOKEN: <token from Forgejo settings>
The validation step will catch this during first CI run and provide a clear error.
## Problem
After code merge, CI workflow will fail at registry login step if repository secrets aren't configured:
```
docker login: error response from daemon: Get "https://forgejo.riotpiao.com/v2/": unauthorized
```
Root cause:
- FORGEJO_REGISTRY_USER / FORGEJO_REGISTRY_TOKEN secrets undefined
- docker login receives empty credentials
- Fails silently or with confusing error
## Solution
1. **Add validation step** that checks if credentials exist
- Fails early with clear error message
- Shows user exactly what to configure
2. **Use direct secret injection** (not env vars)
- Safer: secrets never exposed in env or shell
- Clearer: obvious which step needs which secret
3. **Isolate docker config** to /tmp/docker-config
- Prevents config pollution
- Explicit temporary credentials
## Required Repository Configuration
After merge, configure these secrets in repo settings:
1. Settings → Secrets & variables → Repository secrets
2. Add FORGEJO_REGISTRY_USER: `rock`
3. Add FORGEJO_REGISTRY_TOKEN: `<token from Forgejo settings>`
The validation step will catch this during first CI run and provide a clear error.
Unified pattern enforced:
- test job: runs on all branches + PRs
- build-push job: only on main push, depends on test
- Proper env vars (REGISTRY, IMAGE)
- Install Node.js before checkout
- Install docker only in build-push (conditional)
- Docker login + build + push + prune
Problem: Registry login fails silently if secrets aren't configured
- Empty FORGEJO_REGISTRY_USER/TOKEN → docker login hangs/fails
- No clear error message about missing credentials
Solution: Add validation step that checks credentials exist
- Fails early with clear error if secrets missing
- Shows how to configure in repo settings
- Uses direct secret injection (not via env vars)
- Isolates docker config to /tmp/docker-config
Result: CI will fail fast with actionable error if credentials missing
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Problem
After code merge, CI workflow will fail at registry login step if repository secrets aren't configured:
Root cause:
Solution
Add validation step that checks if credentials exist
Use direct secret injection (not env vars)
Isolate docker config to /tmp/docker-config
Required Repository Configuration
After merge, configure these secrets in repo settings:
rock<token from Forgejo settings>The validation step will catch this during first CI run and provide a clear error.
a940e84970toc3f5f65540Pull request closed