Usa arquivo config.json customizado para forçar a autenticação do Watchtower

This commit is contained in:
Sidney 2026-04-22 22:11:18 -03:00
parent 63591ef1a2
commit 5e864dfcd6
1 changed files with 5 additions and 2 deletions

View File

@ -45,10 +45,13 @@ jobs:
- name: Atualizar Containers em Produção (Watchtower) - name: Atualizar Containers em Produção (Watchtower)
run: | run: |
# Cria um arquivo de autenticacao do Docker manual (A prova de bloqueios de permissão)
AUTH=$(echo -n "${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}" | base64 -w 0)
echo "{\"auths\": {\"ghcr.io\": {\"auth\": \"$AUTH\"}}}" > $(pwd)/ghcr-config.json
docker run --rm \ docker run --rm \
-e DOCKER_API_VERSION=1.44 \ -e DOCKER_API_VERSION=1.44 \
-e REPO_USER=${{ github.actor }} \
-e REPO_PASS=${{ secrets.GITHUB_TOKEN }} \
-v /var/run/docker.sock:/var/run/docker.sock \ -v /var/run/docker.sock:/var/run/docker.sock \
-v $(pwd)/ghcr-config.json:/config.json \
containrrr/watchtower \ containrrr/watchtower \
--run-once --cleanup --debug --run-once --cleanup --debug