-
Notifications
You must be signed in to change notification settings - Fork 2
83 lines (62 loc) · 2.11 KB
/
main_build.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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
name: Reveal Server test, build and deploy
on:
push:
branches: [ main, zambia_2022, keep-location-ids, nih-simulation , security-changes ]
pull_request:
branches: [ none ]
jobs:
build:
runs-on: ubuntu-latest
needs: [ ]
steps:
- name: Checkout reveal-server
uses: actions/checkout@v4
with:
repository: akrosinc/reveal-server
- name: Set up JDK 11
uses: actions/setup-java@v4
with:
java-version: '11'
distribution: 'adopt'
cache: gradle
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew clean build -x test
- name: Archive jar files
uses: actions/upload-artifact@v4
with:
name: reveal-server.jar
path: build/libs/revealserver*-SNAPSHOT.jar
retention-days: 1
container:
runs-on: ubuntu-latest
needs: [ build ]
steps:
- name: Output Run Number
run: echo ${{ github.run_number }}
- name: Checkout reveal-server
uses: actions/checkout@v4
with:
repository: akrosinc/reveal-server
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: akrosinc
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Download a single artifact
uses: actions/download-artifact@v4
with:
name: reveal-server.jar
- name: print working dir contents
run: ls -lah ${{ github.workspace }}
- name: copy artefact to context
run: mv reveal*.jar docker-build-openjdk/reveal-server.jar
- name: Build and push
uses: docker/build-push-action@v6
with:
context: docker-build-openjdk/
push: true
tags: akrosinc/reveal-server:v3.0.${{ github.run_number }}