Adiconando um ckeckout no repositório na criacao do cluster #7
Workflow file for this run
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 - Continuous Integration | |
on: | |
push: | |
branches: | |
- "main" | |
- "development" | |
- "feature/cicd" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- | |
name: Checkout | |
uses: actions/checkout@v4 | |
- | |
name: Login to Docker Hub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- | |
name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- | |
name: Build and push giropops-senhas | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
file: ./Dockerfile-app.yaml | |
push: true | |
tags: ${{ secrets.DOCKERHUB_USERNAME }}/giropops-senhas:1.0 | |
- | |
name: Build and push giropops-redis | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
file: ./Dockerfile-redis.yaml | |
push: true | |
tags: ${{ secrets.DOCKERHUB_USERNAME }}/giropops-redis:7.2.3 | |
create-cluster: | |
runs-on: ubuntu-latest | |
steps: | |
- | |
name: Checkout | |
uses: actions/checkout@v4 | |
- name: Verificando diretório atual | |
run: | | |
ls ${{ github.workspace }} | |
- name: Create k8s Kind Cluster | |
uses: helm/[email protected] | |
with: | |
version: "v0.20.0" | |
kubectl_version: "v1.28.2" | |
config: "${{ github.workspace }}/k8s/cluster.yaml" | |
verbosity: "1" | |
- name: Testando kubectl | |
run: | | |
kubectl cluster-info | |
kubectl get nodes -o wide | |