-
Notifications
You must be signed in to change notification settings - Fork 21
48 lines (46 loc) · 1.48 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
name: docker
on:
push:
branches: master
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install xmllint
run: sudo apt-get update -qq && sudo apt-get install -y libxml2-utils
- name: Install Java and Maven
uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-version: '11'
- name: Cache .maven-workspace
uses: actions/cache@v3
with:
path: .maven-workspace
key: ${{ runner.os }}-maven-workspace-${{ hashFiles('**/pom.xml', '**/*.gradle', '**/gradle.properties') }}
restore-keys: |
${{ runner.os }}-maven-workspace-
- name: Cache .maven-cache
uses: actions/cache@v3
with:
path: .maven-cache
key: ${{ runner.os }}-maven-cache
- name: Cache JRE
uses: actions/cache@v3
with:
path: assembly/src/main/jre
key: ${{ runner.os }}-jre-${{ hashFiles('assembly/src/main/jre/*') }}
- name: Build Docker image
run: make dist-docker-image
- name: Cache newly downloaded non-snapshot Maven artifacts
if: always()
run: make cache
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Push image to Docker Hub
run: |
docker push daisyorg/pipeline:latest-snapshot