-
Notifications
You must be signed in to change notification settings - Fork 236
59 lines (55 loc) · 1.53 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
47
48
49
50
51
52
53
54
55
56
57
58
59
name: Docker test and publish
on:
push:
branches:
- main
jobs:
build-and-publish:
env:
PUPPERWARE_ANALYTICS_STREAM: production
IS_LATEST: true
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Set up Ruby 2.6
uses: actions/setup-ruby@v1
with:
ruby-version: 2.6.x
- run: gem install bundler
- name: Build container
working-directory: docker
run: |
docker system prune --all --force --volumes
docker builder prune --force --keep-storage=10GB
make lint build test
- name: Publish container
working-directory: docker
run: |
docker login -u "$DOCKERHUB_USERNAME" -p "$DOCKERHUB_PASSWORD"
make publish
- name: Build release container
env:
IS_RELEASE: true
working-directory: docker
shell: bash {0}
run: |
make prep
if [ $? -eq 0 ]; then
make lint build test
else
echo "Skipping release container building and testing"
fi
- name: Publish release container
env:
IS_RELEASE: true
working-directory: docker
shell: bash {0}
run: |
make prep
if [ $? -eq 0 ]; then
make publish
else
echo "Skipping release container publishing"
fi