56 lines
1.2 KiB
YAML
56 lines
1.2 KiB
YAML
name: Build & Publish
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- root
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Set up QEMU
|
|
uses: docker/setup-qemu-action@v3
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
- name: Set up Java
|
|
uses: actions/setup-java@v4
|
|
|
|
with:
|
|
java-version: 17
|
|
distribution: temurin
|
|
|
|
- name: Grant execute permission for gradlew
|
|
run: chmod +x gradlew
|
|
|
|
- name: Gradle (Build)
|
|
run: "./gradlew build"
|
|
|
|
- name: Upload build artifacts
|
|
uses: actions/upload-artifact@v3
|
|
|
|
with:
|
|
name: Build and Deploy Artifacts
|
|
path: build/libs/*.jar
|
|
|
|
- name: Login to GitHub Container Registry
|
|
uses: docker/login-action@v2
|
|
|
|
with:
|
|
registry: git.jansel.dev
|
|
username: ${{ github.repository_owner }}
|
|
password: ${{ secrets.CR_PAT }}
|
|
|
|
- name: Build and push
|
|
uses: docker/build-push-action@v5
|
|
with:
|
|
context: .
|
|
platforms: linux/amd64,linux/arm64
|
|
push: true
|
|
tags: git.jansel.dev/jansel/Feixiao:latest
|