Usa arquivo config.json customizado para forçar a autenticação do Watchtower
This commit is contained in:
parent
63591ef1a2
commit
5e864dfcd6
|
|
@ -45,10 +45,13 @@ jobs:
|
|||
|
||||
- name: Atualizar Containers em Produção (Watchtower)
|
||||
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 \
|
||||
-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 $(pwd)/ghcr-config.json:/config.json \
|
||||
containrrr/watchtower \
|
||||
--run-once --cleanup --debug
|
||||
|
|
|
|||
Loading…
Reference in New Issue