-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (45 loc) · 1.42 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
name: Rust
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
env:
CARGO_TERM_COLOR: always
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository_owner }}/trino-joinery
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: asdf-vm/actions/setup@f4acd427436df623426c29f7e3e9ea715be28396
- run: rustup update stable
- uses: extractions/setup-just@v1
- uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: "17"
- uses: actions/checkout@v3
- name: Build & check core
run: just check
- name: Build & check Trino
run: |
just install-dev-tools
(cd java/trino-plugin && java --version && mvn --version && echo "JAVA_HOME: $JAVA_HOME")
just docker-run-trino
just check-trino
docker tag trino-joinery ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
- name: Show docker logs
if: failure()
run: docker logs trino-joinery
- name: Log in to the Container registry
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Push Docker image
run: docker push ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest