Skip to content

Commit 0ebbcdb

Browse files
authored
Merge pull request #242 from GersonRS/develop
feat: tudo funcionando perfeitamente
2 parents 885c842 + 37631ad commit 0ebbcdb

File tree

7 files changed

+491
-355
lines changed

7 files changed

+491
-355
lines changed
Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
---
2+
# Workflow do GitHub Actions para criar e publicar uma imagem Docker no Docker Hub.
3+
#
4+
# IMPORTANTE: Este workflow é chamado por outros workflows e está
5+
# centralizado aqui para facilitar a manutenção entre módulos. Por isso, certifique-se de não introduzir
6+
# mudanças que quebrem a compatibilidade ao modificar este workflow.
7+
8+
name: "modules-docker-build-push"
9+
10+
on:
11+
workflow_call:
12+
inputs:
13+
image_name:
14+
description: "Nome da imagem Docker (ex: gersonrs/minha-app)"
15+
required: true
16+
type: string
17+
context:
18+
description: "Contexto do Docker build (diretório do Dockerfile)"
19+
required: false
20+
type: string
21+
default: "."
22+
dockerfile:
23+
description: "Caminho para o Dockerfile"
24+
required: false
25+
type: string
26+
default: "Dockerfile"
27+
platforms:
28+
description: "Plataformas para build multi-arch (ex: linux/amd64,linux/arm64)"
29+
required: false
30+
type: string
31+
default: "linux/amd64"
32+
secrets:
33+
DOCKERHUB_USERNAME:
34+
description: "Username do Docker Hub"
35+
required: true
36+
DOCKERHUB_TOKEN:
37+
description: "Token de acesso do Docker Hub"
38+
required: true
39+
40+
permissions:
41+
id-token: write
42+
packages: write
43+
contents: read
44+
attestations: write
45+
46+
env:
47+
REGISTRY: docker.io
48+
49+
jobs:
50+
docker:
51+
runs-on: ubuntu-latest
52+
# Pula o build se o PR foi criado pelo release-please
53+
if: |
54+
github.event_name != 'pull_request' ||
55+
!startsWith(github.head_ref, 'release-please--')
56+
steps:
57+
- name: Checkout
58+
uses: actions/checkout@v6
59+
60+
- name: Docker meta
61+
id: meta
62+
uses: docker/metadata-action@v5
63+
with:
64+
images: ${{ inputs.image_name }}
65+
tags: |
66+
type=ref,event=tag
67+
type=ref,event=pr
68+
type=sha,prefix=
69+
70+
- name: Set up QEMU
71+
uses: docker/setup-qemu-action@v3
72+
73+
- name: Set up Docker Buildx
74+
uses: docker/setup-buildx-action@v3
75+
76+
- name: Login to DockerHub
77+
if: github.event_name != 'pull_request'
78+
uses: docker/login-action@v3
79+
with:
80+
username: ${{ secrets.DOCKERHUB_USERNAME }}
81+
password: ${{ secrets.DOCKERHUB_TOKEN }}
82+
83+
- name: Build and push
84+
id: push
85+
uses: docker/build-push-action@v6
86+
with:
87+
context: ${{ inputs.context }}
88+
file: ${{ inputs.context }}/${{ inputs.dockerfile }}
89+
platforms: ${{ inputs.platforms }}
90+
push: ${{ github.event_name != 'pull_request' }}
91+
tags: ${{ steps.meta.outputs.tags }}
92+
labels: ${{ steps.meta.outputs.labels }}
93+
annotations: ${{ steps.meta.outputs.annotations }}
94+
cache-from: type=gha
95+
cache-to: type=gha,mode=max

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ examples/*/terraform.tfstate.*
88
examples/*/.terraform.tfstate.lock.info
99
examples/*/*-config
1010
examples/*/.terraform.lock.hcl
11+
examples/*/*.tfvars
1112

1213

1314
### Files and folders when building the website and documentation locally ###
@@ -57,3 +58,7 @@ ehthumbs_vista.db
5758

5859
# Folder config file
5960
[Dd]esktop.ini
61+
62+
id_ed25519
63+
copilot-instructions.md
64+
tfplan

examples/kind/locals.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ resource "random_password" "airflow_fernetKey" {
33
special = false
44
}
55
locals {
6-
kubernetes_version = "v1.29.2"
6+
kubernetes_version = "v1.35.0"
77
cluster_name = "kind"
88
base_domain = format("%s.nip.io", replace(module.traefik.external_ip, ".", "-"))
99
subdomain = "apps"

0 commit comments

Comments
 (0)