Use registry token secret for image push
All checks were successful
production-orders-sync CI/CD / Test (push) Successful in 9m30s
production-orders-sync CI/CD / Build and Push Image (push) Successful in 36s
production-orders-sync CI/CD / Trigger Portainer (push) Successful in 1s

This commit is contained in:
Cauê Faleiros
2026-07-02 14:52:51 -03:00
parent 97d037d18b
commit 511add34c8
2 changed files with 5 additions and 5 deletions

View File

@@ -61,14 +61,14 @@ jobs:
- name: Login to registry
env:
REGISTRY_USERNAME: ${{ secrets.REGISTRY_USERNAME }}
REGISTRY_PASSWORD: ${{ secrets.REGISTRY_PASSWORD }}
REGISTRY_TOKEN: ${{ secrets.REGISTRY_TOKEN }}
run: |
set -eu
if [ -z "${REGISTRY_USERNAME:-}" ] || [ -z "${REGISTRY_PASSWORD:-}" ]; then
echo "REGISTRY_USERNAME and REGISTRY_PASSWORD secrets are required."
if [ -z "${REGISTRY_USERNAME:-}" ] || [ -z "${REGISTRY_TOKEN:-}" ]; then
echo "REGISTRY_USERNAME and REGISTRY_TOKEN secrets are required."
exit 1
fi
printf '%s' "$REGISTRY_PASSWORD" | docker login "$REGISTRY_URL" --username "$REGISTRY_USERNAME" --password-stdin
printf '%s' "$REGISTRY_TOKEN" | docker login "$REGISTRY_URL" --username "$REGISTRY_USERNAME" --password-stdin
- name: Build Docker image
run: |

View File

@@ -50,7 +50,7 @@ The workflow at `.gitea/workflows/ci-cd.yml` expects these repository secrets:
```sh
REGISTRY_URL=gitea.blyzer.com.br
REGISTRY_USERNAME=...
REGISTRY_PASSWORD=...
REGISTRY_TOKEN=...
IMAGE_REPOSITORY=blyzer/production-order-tiny
PORTAINER_WEBHOOK_URL=https://... # optional but recommended
```