Add: scripts de deploy completo com ImagePullSecret para cluster-admin

This commit is contained in:
2025-09-25 15:24:31 -03:00
parent 2ca4b468cb
commit 25596e2b3e
16 changed files with 747 additions and 43 deletions

View File

@@ -34,35 +34,24 @@ jobs:
run: |
python -c "import app.main; print('✅ App imports successfully')"
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Set up Podman
run: |
sudo apt-get update
sudo apt-get install -y podman buildah skopeo
- name: Extract metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=ref,event=branch
type=ref,event=pr
type=sha,prefix={{branch}}-
type=raw,value=latest,enable={{is_default_branch}}
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Login to Docker Hub
run: |
echo "${{ secrets.DOCKERHUB_TOKEN }}" | podman login docker.io -u ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin
- name: Build and push image with Podman
run: |
# Build da imagem
podman build -t ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }} .
podman build -t ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest .
# Push das imagens
podman push ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }}
podman push ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
- name: Install OpenShift CLI
run: |