ci: configura deploy automatico para k3s
This commit is contained in:
parent
ecac403cdc
commit
d02ba47fe8
1 changed files with 5 additions and 9 deletions
|
|
@ -30,12 +30,9 @@ jobs:
|
||||||
docker buildx inspect --bootstrap
|
docker buildx inspect --bootstrap
|
||||||
|
|
||||||
- name: Login to Forgejo Registry
|
- name: Login to Forgejo Registry
|
||||||
uses: docker/login-action@v3
|
run: |
|
||||||
with:
|
# Tentativa manual de login caso a Action falhe no handshake
|
||||||
registry: pipe.gohorsejobs.com
|
echo "${{ secrets.FORGEJO_TOKEN }}" | docker login pipe.gohorsejobs.com -u bohessefm --password-stdin
|
||||||
username: ${{ github.actor }}
|
|
||||||
# USANDO O TOKEN QUE VOCÊ CADASTROU NO SECRETS
|
|
||||||
password: ${{ secrets.FORGEJO_TOKEN }}
|
|
||||||
|
|
||||||
- name: Build and Push Backend
|
- name: Build and Push Backend
|
||||||
uses: docker/build-push-action@v5
|
uses: docker/build-push-action@v5
|
||||||
|
|
@ -43,7 +40,7 @@ jobs:
|
||||||
context: ./backend
|
context: ./backend
|
||||||
file: ./backend/Dockerfile
|
file: ./backend/Dockerfile
|
||||||
push: true
|
push: true
|
||||||
provenance: false # Melhora compatibilidade com Forgejo
|
provenance: false
|
||||||
tags: |
|
tags: |
|
||||||
pipe.gohorsejobs.com/bohessefm/gohorsejobs:latest
|
pipe.gohorsejobs.com/bohessefm/gohorsejobs:latest
|
||||||
pipe.gohorsejobs.com/bohessefm/gohorsejobs:${{ github.sha }}
|
pipe.gohorsejobs.com/bohessefm/gohorsejobs:${{ github.sha }}
|
||||||
|
|
@ -56,7 +53,7 @@ jobs:
|
||||||
context: ./backoffice
|
context: ./backoffice
|
||||||
file: ./backoffice/Dockerfile
|
file: ./backoffice/Dockerfile
|
||||||
push: true
|
push: true
|
||||||
provenance: false # Melhora compatibilidade com Forgejo
|
provenance: false
|
||||||
tags: |
|
tags: |
|
||||||
pipe.gohorsejobs.com/bohessefm/backoffice:latest
|
pipe.gohorsejobs.com/bohessefm/backoffice:latest
|
||||||
pipe.gohorsejobs.com/bohessefm/backoffice:${{ github.sha }}
|
pipe.gohorsejobs.com/bohessefm/backoffice:${{ github.sha }}
|
||||||
|
|
@ -72,7 +69,6 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- name: Prepare Deploy
|
- name: Prepare Deploy
|
||||||
run: |
|
run: |
|
||||||
# Instalando kubectl caso a imagem alpine não tenha
|
|
||||||
apk add --no-cache git curl
|
apk add --no-cache git curl
|
||||||
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
|
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
|
||||||
chmod +x kubectl
|
chmod +x kubectl
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue