-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (44 loc) · 1.47 KB
/
main.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
name: Native Build
on:
release:
types: [created]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Display release tag
run: echo ${{ github.event.release.tag_name }}
- name: Pull Docker Image
run: docker pull gradle:jdk21-graal-jammy
- name: Gradle Build
run: |
docker run --rm \
-e GITHUB_REF=${{ github.ref }} \
-e GITHUB_SHA=${{ github.sha }} \
-e PLUGIN_ORGCONFIG=https://vacco-oss.s3.us-east-2.amazonaws.com/vacco-oss.json \
-v ${{ github.workspace }}:/workspace \
-w /workspace \
gradle:jdk21-graal-jammy \
gradle clean build nativeCompile
- name: Upload binaries
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.ref }}
file: a4-lb/build/native/nativeCompile/a4lb-*
file_glob: true
- name: Log in to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: ./a4-lb
push: true
tags: |
ghcr.io/${{ github.repository_owner }}/$(basename ${{ github.repository }}):${{ github.ref_name }}
file: Dockerfile