This repository was archived by the owner on Apr 10, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (60 loc) · 1.65 KB
/
docker.yml
File metadata and controls
64 lines (60 loc) · 1.65 KB
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
60
61
62
63
64
name: Publish Docker
on:
push:
branches:
- master
tags:
- '[0-9].*'
jobs:
build-dist:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- uses: frabert/replace-string-action@v1.1
id: str_replace
with:
pattern: '.+/(.+)'
string: ${{ github.ref }}
replace-with: '$1'
- uses: cschleiden/replace-tokens@v1
with:
files: 'src/main/resources/version.properties'
env:
GIT_SHA: ${{ github.sha }}
GIT_BRANCH: ${{ github.ref }}
APP_VER: ${{ steps.str_replace.outputs.replaced }}
- uses: cschleiden/replace-tokens@v1
with:
files: 'build.gradle'
env:
VERSION: ${{ steps.str_replace.outputs.replaced }}
- name: Build with Gradle
run: /bin/sh ./gradlew test shadowDistZip
- uses: actions/upload-artifact@v2-preview
with:
name: test-results
path: build/reports
- uses: actions/upload-artifact@v2-preview
with:
name: dist
path: build/distributions/*.zip
build-docker:
runs-on: ubuntu-latest
needs: build-dist
steps:
- uses: actions/checkout@v2
- uses: actions/download-artifact@v1
with:
name: dist
path: docker/root
- uses: elgohr/Publish-Docker-Github-Action@master
with:
name: slugger/embysweeper
username: ${{secrets.DKHUB_ID}}
password: ${{secrets.DKHUB_KEY}}
workdir: docker
tag_names: true