Improved build-docker.yml

This commit is contained in:
RaphiMC 2024-06-29 15:14:22 +02:00
parent d5d44806a9
commit 50667e9787
No known key found for this signature in database
GPG key ID: 0F6BB0657A03AC94
2 changed files with 5 additions and 4 deletions

View file

@ -38,15 +38,16 @@ jobs:
with: with:
tags: | tags: |
type=raw,value=latest type=raw,value=latest
type=sha type=raw,value=${{ github.ref_name }}
type=semver,pattern={{version}}
images: ${{ env.REGISTRY }}/${{ github.repository }} images: ${{ env.REGISTRY }}/${{ github.repository }}
- name: Build and push Docker image - name: Build and push Docker image
uses: docker/build-push-action@v5 uses: docker/build-push-action@v6
with: with:
context: . context: .
push: true push: true
provenance: false
tags: ${{ steps.meta.outputs.tags }} tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }} labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64,linux/arm64
cache-from: type=gha cache-from: type=gha
cache-to: type=gha,mode=max cache-to: type=gha,mode=max

View file

@ -1,4 +1,4 @@
FROM --platform=$TARGETPLATFORM eclipse-temurin:21-jre-alpine FROM eclipse-temurin:21-jre-alpine
WORKDIR /app/run WORKDIR /app/run
COPY /build/libs/ViaProxy-*.jar /app/ViaProxy.jar COPY /build/libs/ViaProxy-*.jar /app/ViaProxy.jar
ENTRYPOINT ["java", "-jar", "/app/ViaProxy.jar", "config", "viaproxy.yml"] ENTRYPOINT ["java", "-jar", "/app/ViaProxy.jar", "config", "viaproxy.yml"]