modify to show all #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI-CD | |
on: | |
push: | |
branches: ["main"] | |
workflow_dispatch: #dispara manuamente | |
jobs: | |
CI: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Obtendo codigo | |
uses: actions/[email protected] | |
- name: Autenticação no Docker Hub | |
uses: docker/[email protected] | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Build da imagem Docker | |
uses: docker/[email protected] | |
with: | |
context: ./src | |
file: ./src/Dockerfile | |
push: true | |
tags: | | |
marlonbastida/aula-primeira-pipeline:v${{ github.run_number }} | |
marlonbastida/aula-primeira-pipeline:latest | |
CD: | |
runs-on: ubuntu-latest | |
needs: [CI] | |
steps: | |
- name: Obtendo codigo | |
uses: actions/[email protected] | |
- name: Configuração de texto do Kubernetes | |
uses: azure/[email protected] | |
with: | |
method: kubeconfig | |
kubeconfig: ${{ secrets.K8SCONFIG }} | |
- name: Execução do Manifesto | |
- uses: Azure/k8s-deploy@v5 | |
with: | |
manifests: | | |
./k8s/deployment.yaml | |
images: | | |
marlonbastida/aula-primeira-pipeline:v${{ github.run_number }} |