-
Notifications
You must be signed in to change notification settings - Fork 372
46 lines (39 loc) · 1.03 KB
/
docker.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
46
name: Docker Build Validation
on:
push:
branches: [main]
pull_request:
types: [opened, reopened, synchronize]
workflow_dispatch:
jobs:
build:
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: free disk space
run: |
sudo swapoff -a
sudo rm -f /swapfile
sudo apt clean
docker rmi $(docker image ls -aq)
df -h
- name: Build
uses: docker/build-push-action@v2
with:
push: false
context: .
file: Dockerfile
tags: botframework-composer
target: build # CI will stop at the build stage
- name: Health check
run: |
containerId=$(docker run -d -p "5000:5000" botframework-composer)
sleep 10
docker logs $containerId
curl -Is http://localhost:5000 | grep -q "200 OK"
shell: bash
- name: Clean up
if: always()
run: docker rm -f $(docker ps -a -q)