-
Notifications
You must be signed in to change notification settings - Fork 15
63 lines (53 loc) · 2.14 KB
/
Copy pathdocker.yaml
File metadata and controls
63 lines (53 loc) · 2.14 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
name: Docker
on:
push:
branches: [main]
tags:
- v**
env:
REPOSITORY_OWNER: ${{ github.repository_owner }}
GHCR_REGISTRY: "ghcr.io"
GHCR_REGISTRY_USERNAME: ${{ github.actor }}
GHCR_REGISTRY_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
sdk-test-docker:
if: github.repository_owner == 'restatedev'
runs-on: warp-ubuntu-latest-x64-4x
name: "Create test-services Docker Image (JRE ${{ matrix.jreVersion }})"
strategy:
fail-fast: false
matrix:
# 17 & 21 -> pure-Java state machine (17 also published as :main); 25 -> Panama/FFM state machine.
jreVersion: [ 17, 21, 25 ]
steps:
- uses: actions/checkout@v6
with:
repository: restatedev/sdk-java
- name: Setup Java
uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: '25'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v6
- name: Install Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
cache-workspaces: sdk-core/src/main/rust
- name: Log into GitHub container registry
uses: docker/login-action@v4
with:
registry: ${{ env.GHCR_REGISTRY }}
username: ${{ env.GHCR_REGISTRY_USERNAME }}
password: ${{ env.GHCR_REGISTRY_TOKEN }}
- name: Build restatedev/test-services-java image (JRE ${{ matrix.jreVersion }})
run: ./gradlew -Djib.console=plain :test-services:jibDockerBuild -PtestServicesJre=${{ matrix.jreVersion }}
- name: Push restatedev/test-services-java image
run: |
docker tag restatedev/test-services-java ghcr.io/restatedev/test-services-java:main-jre${{ matrix.jreVersion }}
docker push ghcr.io/restatedev/test-services-java:main-jre${{ matrix.jreVersion }}
# The minimum-Java (pure-Java state machine) image is also the default :main tag.
if [ "${{ matrix.jreVersion }}" = "17" ]; then
docker tag restatedev/test-services-java ghcr.io/restatedev/test-services-java:main
docker push ghcr.io/restatedev/test-services-java:main
fi