Skip to content

Criando CI de build para o Super Marion. #5

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

Open
wants to merge 8 commits into
base: master
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
29 changes: 29 additions & 0 deletions .github/workflows/supermario.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Super Mario CI/CD

on:
push:
branches:
- main

jobs:
build_and_push:
runs-on: ubuntu-latest

steps:
- name: Checkout do código
uses: actions/checkout@v3

- name: Login Docker Hub
run: |
echo "${{ secrets.DOCKER_HUB_PASSWORD }}" | docker login -u ${{ secrets.DOCKER_HUB_USER }} --password-stdin

- name: Build da imagem
run: |
docker build -t anacarvalho3006/supermario:${{ github.run_id }} .
docker tag anacarvalho3006/supermario:${{ github.run_id }} anacarvalho3006/supermario:latest


- name: Push da imagem para o Docker Hub
run: |
docker push anacarvalho3006/supermario:${{ github.run_id }}
docker push anacarvalho3006/supermario:latest