-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (36 loc) · 1.04 KB
/
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
40
41
42
43
44
45
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}}