Update .forgejo/workflows/deploy.yaml
This commit is contained in:
parent
911b3325b4
commit
ecff4ad2a9
1 changed files with 12 additions and 7 deletions
|
|
@ -16,7 +16,10 @@ jobs:
|
||||||
shell: sh
|
shell: sh
|
||||||
steps:
|
steps:
|
||||||
- name: Install Dependencies
|
- name: Install Dependencies
|
||||||
run: apk add --no-cache git docker-cli docker-cli-buildx nodejs
|
run: |
|
||||||
|
# Troca para um mirror mais robusto antes de instalar
|
||||||
|
sed -i 's/dl-cdn.alpinelinux.org/mirror.leaseweb.com/g' /etc/apk/repositories
|
||||||
|
apk add --no-cache --update git docker-cli docker-cli-buildx nodejs
|
||||||
|
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
@ -25,10 +28,12 @@ jobs:
|
||||||
|
|
||||||
- name: Set up Docker Buildx (Deep Clean)
|
- name: Set up Docker Buildx (Deep Clean)
|
||||||
run: |
|
run: |
|
||||||
# Remove builders antigos e limpa o cache de build para evitar erro 401 em blobs existentes
|
# Limpeza total para evitar conflitos de blobs e 401 Unauthorized
|
||||||
docker buildx rm local-builder || true
|
docker buildx rm local-builder || true
|
||||||
docker builder prune -a -f
|
docker builder prune -a -f
|
||||||
docker buildx create --use --driver docker-container --name local-builder
|
docker buildx create --use --driver docker-container --name local-builder \
|
||||||
|
--driver-opt network=host \
|
||||||
|
--driver-opt image=moby/buildkit:master
|
||||||
docker buildx inspect --bootstrap
|
docker buildx inspect --bootstrap
|
||||||
|
|
||||||
- name: Login to Forgejo Registry
|
- name: Login to Forgejo Registry
|
||||||
|
|
@ -46,7 +51,6 @@ jobs:
|
||||||
push: true
|
push: true
|
||||||
provenance: false
|
provenance: false
|
||||||
sbom: false
|
sbom: false
|
||||||
# O no-cache garante que ele não tente usar camadas 'zumbis' do runner
|
|
||||||
no-cache: true
|
no-cache: true
|
||||||
tags: |
|
tags: |
|
||||||
pipe.gohorsejobs.com/bohessefm/gohorsejobs:latest
|
pipe.gohorsejobs.com/bohessefm/gohorsejobs:latest
|
||||||
|
|
@ -74,10 +78,11 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- name: Install Tools (Git & Kubectl)
|
- name: Install Tools (Git & Kubectl)
|
||||||
run: |
|
run: |
|
||||||
|
sed -i 's/dl-cdn.alpinelinux.org/mirror.leaseweb.com/g' /etc/apk/repositories
|
||||||
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"
|
K8S_VERSION=$(curl -L -s https://dl.k8s.io/release/stable.txt)
|
||||||
chmod +x kubectl
|
curl -L -o /usr/local/bin/kubectl "https://dl.k8s.io/release/${K8S_VERSION}/bin/linux/amd64/kubectl"
|
||||||
mv kubectl /usr/local/bin/
|
chmod +x /usr/local/bin/kubectl
|
||||||
|
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue