Compare commits
16 Commits
927003e48f
...
2bd3cd5cd1
Author | SHA1 | Date |
---|---|---|
|
2bd3cd5cd1 | |
|
8600180f30 | |
|
a851c34d1d | |
|
edd8b94d00 | |
|
598b1b2986 | |
|
d55509a9db | |
|
4319a34163 | |
|
0b3e6e5fc8 | |
|
6466957dc9 | |
|
b01ab5efca | |
|
f2ab9630e8 | |
|
ecb0a84c42 | |
|
9450bd24a7 | |
|
875c95885a | |
|
caf18da694 | |
|
b6b63a6c6d |
|
@ -0,0 +1,42 @@
|
|||
name: build-docker
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
env:
|
||||
REGISTRY: ghcr.io
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v4
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
- name: Log into registry ${{ env.REGISTRY }}
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ${{ env.REGISTRY }}
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Extract Docker metadata
|
||||
id: meta
|
||||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
tags: |
|
||||
type=raw,value=latest
|
||||
type=sha
|
||||
images: ${{ env.REGISTRY }}/${{ github.repository }}
|
||||
- name: Build and push Docker image
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
platforms: linux/amd64,linux/arm64
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
|
@ -0,0 +1,11 @@
|
|||
FROM --platform=$BUILDPLATFORM gradle:jdk17 as builder
|
||||
WORKDIR /build
|
||||
COPY build.gradle settings.gradle gradle.properties ./
|
||||
COPY .git .git
|
||||
COPY src src
|
||||
RUN gradle --no-daemon build
|
||||
|
||||
FROM --platform=$TARGETPLATFORM eclipse-temurin:21-jre-alpine
|
||||
WORKDIR /app
|
||||
COPY --from=builder /build/build/libs/ViaProxy-*.jar ViaProxy.jar
|
||||
ENTRYPOINT ["java", "-jar", "ViaProxy.jar"]
|
|
@ -9,4 +9,8 @@ pluginManagement {
|
|||
}
|
||||
}
|
||||
|
||||
plugins {
|
||||
id "org.gradle.toolchains.foojay-resolver-convention" version "0.8.0"
|
||||
}
|
||||
|
||||
rootProject.name = "ViaProxy"
|
||||
|
|
Loading…
Reference in New Issue