-
-
Notifications
You must be signed in to change notification settings - Fork 88
79 lines (76 loc) · 2.35 KB
/
jvm-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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
name: Java CI (push)
on:
push:
workflow_dispatch:
jobs:
CI:
uses: ./.github/workflows/build_maven.yml
secrets: inherit
Build_Installers:
needs: CI
uses: ./.github/workflows/build_installers.yml
secrets: inherit
Build_SPK:
needs: CI
uses: ./.github/workflows/build_spk.yml
with:
image: ghostchu/peerbanhelper-snapshot:sha-$(git rev-parse --short ${{ github.sha }})
Build_DEB:
needs: CI
uses: ./.github/workflows/build_deb.yml
Build_PKG:
needs: CI
uses: ./.github/workflows/build_pkg.yml
Build_Docker:
needs: CI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: maven-dist
path: target
- name: Set Up QEMU
uses: docker/setup-qemu-action@v3
- name: Set Up Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/[email protected]
with:
images: ghostchu/peerbanhelper-snapshot
tags: |
type=ref,event=branch
type=ref,event=tag
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=raw,ci-jvm-universal
type=raw,ci
type=sha
- name: Build and push Docker image
uses: docker/[email protected]
with:
context: .
file: ./Dockerfile
push: true
platforms: |
linux/amd64
linux/arm64/v8
linux/riscv64
linux/ppc64le
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}-jvm-universal
cache-from: type=gha
cache-to: type=gha,mode=max