Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove file #9

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 8 additions & 26 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,43 +1,25 @@
name: CI-CD
on:
on:
push:
branches: ["main"]
workflow_dispatch:
workflow_dispatch: # Permite que eu dispare o workflow manualmente
jobs:
CI:
runs-on: ubuntu-latest
steps:
- name: Obtendo o código
uses: actions/[email protected].5
uses: actions/[email protected].7
- name: Autenticação no Docker Hub
uses: docker/login-action@v3.1.0
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build da Imagem Docker
uses: docker/build-push-action@v5.3.0
uses: docker/build-push-action@v6.7.0
with:
context: ./src
file: ./src/Dockerfile
push: true
tags: |
fabricioveronez/aula-primeira-pipeline:v${{ github.run_number }}
fabricioveronez/aula-primeira-pipeline:latest
CD:
runs-on: ubuntu-latest
needs: [CI]
steps:
- name: Obtendo o código
uses: actions/[email protected]
- name: Configuração de contexto do Kubernetes
uses: azure/[email protected]
with:
method: kubeconfig
kubeconfig: ${{ secrets.K8S_CONFIG }}
- name: Execução do Manifesto
uses: Azure/k8s-deploy@v5
with:
manifests: |
./k8s/deployment.yaml
images: |
fabricioveronez/aula-primeira-pipeline:v${{ github.run_number }}
tags: |
lucascarmo/aula-primeira-pipeline:v${{ github.run_number }}
lucascarmo/aula-primeira-pipeline:latest