checkpoint #4728
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |