Skip to content

Added . to docker build yaml #17

Added . to docker build yaml

Added . to docker build yaml #17

Workflow file for this run

name: Production
on:
push:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@v2
- name: Login to docker hub
run: docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }}
- name: Build docker image
run: docker build -t vtmunc/app ./app
- name: Publish images to docker hub
run: docker push vtmunc/app:latest
deploy:
runs-on: self-hosted
needs: build
steps:
- name: Login to docker hub
run: docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }}
- name: Pull docker image
run: docker pull vtmunc/app:latest
- name: Remove old containers
run: docker rm -f vtmunc || true
- name: Run container
run: docker run -p 8080:8080 -d --name vtmunc vtmunc/app
- name: Clean up (Removes old containers)
run: docker system prune -f