-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (44 loc) · 1.07 KB
/
java-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
name: Java (build)
on:
push:
paths:
- 'visual-java/**'
- .github/workflows/java-build.yml
pull_request:
paths:
- 'visual-java/**'
- .github/workflows/java-build.yml
defaults:
run:
working-directory: visual-java
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '8'
cache: 'maven'
- name: Build with Maven
run: mvn -B package --file pom.xml
build-test-docker-image:
runs-on: ubuntu-latest
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and push
uses: docker/build-push-action@v5
with:
context: "{{defaultContext}}:visual-java"
tags: saucelabs/java-sdk
file: Dockerfile
load: true
test:
runs-on: ubuntu-latest
needs: build-test-docker-image
steps:
- uses: actions/checkout@v4
- run: docker run saucelabs/java-sdk