-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (47 loc) · 1.22 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
46
47
48
49
50
name: CI
on: [push]
jobs:
test:
name: ARK Resolver Tests
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@v1
with:
fetch-depth: 1
- name: Disk Free
run: |
df -h
docker system df
docker system prune --all --force --volumes
df -h
- name: Run ARK resolver unit tests
run: make test
- name: Disk Free After
run: |
df -h
docker system df
# publish only for develop and tags
publish:
name: Publish to Dockerhub
needs: [test]
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags')
steps:
- uses: actions/checkout@v1
with:
fetch-depth: 50
- name: Disk Free
run: |
df -h
docker system df
docker system prune --all --force --volumes
df -h
- name: build and publish all images to Dockerhub
run: |
echo ${{ secrets.DOCKER_HUB_TOKEN }} | docker login -u ${{ secrets.DOCKER_USER }} --password-stdin
make publish
- name: Disk Free After
run: |
df -h
docker system df