-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (31 loc) · 920 Bytes
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
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@0b41561cca6822cc8d880fe0e49e7807a41fdf91
- 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: Build and Push Image
uses: docker/build-push-action@master
with:
context: .
file: ./Dockerfile
push: true
tags: jarrettgaither/liatriowebapp:latest