-
-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (51 loc) · 1.44 KB
/
ci.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
name: CI
on:
pull_request:
branches:
- main
paths-ignore:
- '**/*.md'
push:
branches:
- main
paths-ignore:
- '**/*.md'
env:
TERM: dumb
jobs:
assemble-and-check:
name: Build executable jar, run unit tests and static analysis
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '22'
- uses: gradle/actions/setup-gradle@v4
with:
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
- run: ./gradlew assemble check --no-configuration-cache
deploy:
name: Build and push container image to Google Artifact Registry, deploy to Cloud Run
# needs: [ assemble-and-check ]
# if: github.ref == 'refs/heads/main'
runs-on: macos-13
steps:
- uses: actions/checkout@v4
- uses: graalvm/setup-graalvm@v1
with:
distribution: 'graalvm-community'
java-version: '22'
github-token: ${{ secrets.GITHUB_TOKEN }}
- uses: gradle/actions/setup-gradle@v4
- name: Compile GraalVM native image
run: ./gradlew nativeCompile --no-configuration-cache
- uses: docker/setup-buildx-action@v3
# TODO login to GAR
- name: Build and push
uses: docker/build-push-action@v6
with:
context: .
push: false # TODO push
tags: ${{env.GITHUB_SHA}}