Skip to content

Update main.yml

Update main.yml #18

Workflow file for this run

name: Tester
on:
push:
branches:
- 'main'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Build Image
run: docker build -t jarrettgaither/liatriowebapp .
- name: Run Container
run: docker run -d -p 80:80 --name container1 jarrettgaither/liatriowebapp
- name: run tests
uses: liatrio/github-actions/apprentice-action@apprentice-action-update
- name: Stop Container
run: docker stop container1
- name: Log in to Docker Hub
uses: docker/login-action@master
with:
username: ${{secrets.DOCKER_USERNAME}}
password: ${{secrets.DOCKER_PASSWORD}}
- name: Get Metadata
uses: docker/metadata-action@master
with:
images: jarrettgaither/liatriowebapp
- name: Build and Push Image
uses: docker/build-push-action@master
with:
context: .
file: ./Dockerfile
push: true
tags: ${{steps.meta.output.tags}}
labels: ${{steps.meta.output.labels}}