Skip to content

Commit

Permalink
WORKFLOW: Try to make it work
Browse files Browse the repository at this point in the history
  • Loading branch information
Vicjun22 committed Oct 12, 2024
1 parent 6801fc2 commit 3f57508
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build and Run Docker Image
name: Build and Push Docker Image

on:
push:
Expand All @@ -16,8 +16,18 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Build Docker image
run: docker build -t my-app:latest ./api
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Build and push Docker image
uses: docker/build-push-action@v2
with:
context: ./api
push: true
tags: vicross22/calculadora-renda:latest

- name: Run Docker container
run: docker run -d -p 8080:8080 --name di di:latest
run: docker run -d -p 8080:8080 --name calculadora-renda vicross22/calculadora-renda:latest

0 comments on commit 3f57508

Please sign in to comment.