-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (61 loc) · 1.84 KB
/
relay-store-service.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
60
61
62
63
64
name: Relay storage service CI
on:
push:
branches:
- master
defaults:
run:
working-directory: relay-store-service
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up JDK 17
uses: actions/setup-java@v1
with:
java-version: 17
- name: Cache Gradle packages
uses: actions/cache@v2
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: ${{ runner.os }}-gradle
- name: Build with infrastructure libs
run: gradle publishToMavenLocal -p "../infrastructure/"
- name: Build with Gradle
run: gradle build
- uses: actions/upload-artifact@v2
with:
name: built-service
path: relay-store-service/build/libs
if-no-files-found: error
- name: Generate test report
run: gradle jacocoTestReport
- name: Sonar analyse
run: gradle sonar
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_DATA_SERVICE_TOKEN: ${{ secrets.SONAR_CLOUD_TOKEN }}
# docker:
# name: Publish to Docker Hub
# runs-on: ubuntu-latest
# needs: [ build ]
# env:
# REPO: ${{ secrets.DOCKER_REPO }}
#
# steps:
# - name: Checkout
# uses: actions/checkout@v2
# - uses: actions/download-artifact@v2
# with:
# name: builded-service
# path: data-service/build/libs
# - name: Login to Docker Hub
# run: docker login -u ${{ secrets.DOCKER_USER }} -p ${{ secrets.DOCKER_PASS }}
# - name: Build latest Docker image
# run: docker build -t ${{ secrets.DOCKER_USER }}/$REPO:latest .
# - name: Publish Docker image
# run: docker push ${{ secrets.DOCKER_USER }}/$REPO:latest