forked from KubeDev/rotten-potatoes
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
66371e3
commit c1c9760
Showing
1 changed file
with
53 additions
and
53 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,64 +1,64 @@ | ||
# This is a basic workflow to help you get started with Actions | ||
# # This is a basic workflow to help you get started with Actions | ||
|
||
name: CI-CD | ||
# name: CI-CD | ||
|
||
# Controls when the workflow will run | ||
on: | ||
# Triggers the workflow on push or pull request events but only for the "main" branch | ||
push: | ||
branches: [ "main" ] | ||
# # Controls when the workflow will run | ||
# on: | ||
# # Triggers the workflow on push or pull request events but only for the "main" branch | ||
# push: | ||
# branches: [ "main" ] | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
# # Allows you to run this workflow manually from the Actions tab | ||
# workflow_dispatch: | ||
|
||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | ||
jobs: | ||
# This workflow contains a single job called "build" | ||
CI: | ||
# The type of runner that the job will run on | ||
runs-on: ubuntu-latest | ||
# # A workflow run is made up of one or more jobs that can run sequentially or in parallel | ||
# jobs: | ||
# # This workflow contains a single job called "build" | ||
# CI: | ||
# # The type of runner that the job will run on | ||
# runs-on: ubuntu-latest | ||
|
||
# Steps represent a sequence of tasks that will be executed as part of the job | ||
steps: | ||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | ||
- uses: actions/checkout@v3 | ||
# # Steps represent a sequence of tasks that will be executed as part of the job | ||
# steps: | ||
# # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | ||
# - uses: actions/checkout@v3 | ||
|
||
- name: Autenticando no Docker Registry | ||
# You may pin to the exact commit or the version. | ||
# uses: docker/login-action@49ed152c8eca782a232dede0303416e8f356c37b | ||
uses: docker/login-action@v2.0.0 | ||
with: | ||
username: ${{secrets.DOCKERHUB_USER}} | ||
password: ${{secrets.DOCKERHUB_PWD}} | ||
# - name: Autenticando no Docker Registry | ||
# # You may pin to the exact commit or the version. | ||
# # uses: docker/login-action@49ed152c8eca782a232dede0303416e8f356c37b | ||
# uses: docker/login-action@v2.0.0 | ||
# with: | ||
# username: ${{secrets.DOCKERHUB_USER}} | ||
# password: ${{secrets.DOCKERHUB_PWD}} | ||
|
||
- name: Construção da imagem Docker | ||
# You may pin to the exact commit or the version. | ||
# uses: docker/build-push-action@c84f38281176d4c9cdb1626ffafcd6b3911b5d94 | ||
uses: docker/build-push-action@v3.1.1 | ||
with: | ||
context: ./src | ||
file: ./src/Dockerfile | ||
push: true | ||
tags: | | ||
fabricioveronez/rotten-potatoes:latest | ||
fabricioveronez/rotten-potatoes:${{github.run_number}} | ||
# - name: Construção da imagem Docker | ||
# # You may pin to the exact commit or the version. | ||
# # uses: docker/build-push-action@c84f38281176d4c9cdb1626ffafcd6b3911b5d94 | ||
# uses: docker/build-push-action@v3.1.1 | ||
# with: | ||
# context: ./src | ||
# file: ./src/Dockerfile | ||
# push: true | ||
# tags: | | ||
# fabricioveronez/rotten-potatoes:latest | ||
# fabricioveronez/rotten-potatoes:${{github.run_number}} | ||
|
||
# CD: | ||
# runs-on: ubuntu-latest | ||
# needs: [CI] | ||
# steps: | ||
# - uses: actions/checkout@v3 | ||
# # CD: | ||
# # runs-on: ubuntu-latest | ||
# # needs: [CI] | ||
# # steps: | ||
# # - uses: actions/checkout@v3 | ||
|
||
# - name: Kubernetes Set Context | ||
# uses: Azure/k8s-set-context@v3.0 | ||
# with: | ||
# method: kubeconfig | ||
# kubeconfig: ${{secrets.K8S_CONFIG}} | ||
# # - name: Kubernetes Set Context | ||
# # uses: Azure/k8s-set-context@v3.0 | ||
# # with: | ||
# # method: kubeconfig | ||
# # kubeconfig: ${{secrets.K8S_CONFIG}} | ||
|
||
# - name: Deploy to Kubernetes cluster | ||
# uses: Azure/k8s-deploy@v4 | ||
# with: | ||
# images: fabricioveronez/rotten-potatoes:${{github.run_number}} | ||
# manifests: | | ||
# k8s/deployment.yaml | ||
# # - name: Deploy to Kubernetes cluster | ||
# # uses: Azure/k8s-deploy@v4 | ||
# # with: | ||
# # images: fabricioveronez/rotten-potatoes:${{github.run_number}} | ||
# # manifests: | | ||
# # k8s/deployment.yaml | ||
|