Skip to content

Commit 4c40dbc

Browse files
Pipeline de CI
1 parent 0b9dbb0 commit 4c40dbc

2 files changed

Lines changed: 51 additions & 4 deletions

File tree

.github/workflows/main.yml

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,24 @@ jobs:
99
CI:
1010
runs-on: ubuntu-latest
1111
steps:
12-
- run: ech "Obter o código"
13-
- run: echo "Executar o Docker Build"
14-
- run: echo "Enviar a Imagem Docker para o Docker Hub"
12+
- name: Checkout repository
13+
uses: actions/checkout@v4
14+
15+
- name: Login to Docker Hub
16+
uses: docker/login-action@v3
17+
with:
18+
username: ${{ secrets.DOCKERHUB_USERNAME }}
19+
password: ${{ secrets.DOCKERHUB_TOKEN }}
20+
21+
- name: Build and push Docker image
22+
uses: docker/build-push-action@v6
23+
with:
24+
context: 02-kube-news/src
25+
file: 02-kube-news/src/Dockerfile
26+
push: true
27+
tags: |
28+
fabriciosveronez/kube-news-maratona:v${{ github.run_number }}
29+
fabriciosveronez/kube-news-maratona:latest
1530
1631
CD:
1732
needs: [CI]

README.md

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,33 @@
1-
# maratona-devops-ia
1+
# maratona-devops-ia
2+
3+
Link para ter $ 200 na Digital Ocean
4+
5+
https://m.do.co/c/a939ecc60dfa
6+
7+
8+
# Estrutura Inicial
9+
10+
```yaml
11+
name: CI-CD
12+
13+
on:
14+
push:
15+
branches: [ "main" ]
16+
workflow_dispatch:
17+
18+
jobs:
19+
CI:
20+
runs-on: ubuntu-latest
21+
steps:
22+
- run: echo "Obter o código"
23+
- run: echo "Executar o Docker Build"
24+
- run: echo "Enviar a Imagem Docker para o Docker Hub"
25+
26+
CD:
27+
runs-on: ubuntu-latest
28+
29+
steps:
30+
- run: echo "Obter o código"
31+
- run: echo "Configurar o Kubeconfig"
32+
- run: echo "Executar o apply"
33+
```

0 commit comments

Comments
 (0)