mirror of
https://github.com/g3rv4/FakeRelay.git
synced 2025-02-18 00:00:47 +01:00
Also build an arm64 image
This commit is contained in:
parent
a2d351161c
commit
20befd3d9e
20
.github/workflows/build.yml
vendored
20
.github/workflows/build.yml
vendored
@ -6,6 +6,9 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
architecture: [ amd64, arm64v8 ]
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
@ -25,6 +28,17 @@ jobs:
|
|||||||
Write-Host "Version $version"
|
Write-Host "Version $version"
|
||||||
Pop-Location
|
Pop-Location
|
||||||
|
|
||||||
docker build . --tag ghcr.io/g3rv4/fakerelay:latest --tag "ghcr.io/g3rv4/fakerelay:$version"
|
if ('${{ matrix.architecture }}' -eq 'arm64v8') {
|
||||||
docker push ghcr.io/g3rv4/fakerelay:latest
|
sudo apt-get install qemu binfmt-support qemu-user-static
|
||||||
docker push "ghcr.io/g3rv4/fakerelay:$version"
|
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
|
||||||
|
}
|
||||||
|
|
||||||
|
docker build . -t ghcr.io/g3rv4/fakerelay:latest-${{ matrix.architecture }} --build-arg ARCH=${{ matrix.architecture }}
|
||||||
|
docker tag ghcr.io/g3rv4/fakerelay:latest-${{ matrix.architecture }} ghcr.io/g3rv4/fakerelay:$version-${{ matrix.architecture }}
|
||||||
|
docker push ghcr.io/g3rv4/fakerelay:latest-${{ matrix.architecture }}
|
||||||
|
docker push ghcr.io/g3rv4/fakerelay:$version-${{ matrix.architecture }}
|
||||||
|
|
||||||
|
if ('${{ matrix.architecture }}' -eq 'amd64') {
|
||||||
|
docker tag ghcr.io/g3rv4/fakerelay:latest-${{ matrix.architecture }} ghcr.io/g3rv4/fakerelay:latest
|
||||||
|
docker push ghcr.io/g3rv4/fakerelay:latest
|
||||||
|
}
|
||||||
|
@ -1,11 +1,12 @@
|
|||||||
# syntax=docker/dockerfile:1
|
# syntax=docker/dockerfile:1
|
||||||
|
|
||||||
FROM mcr.microsoft.com/dotnet/sdk:6.0.403-alpine3.16 AS builder
|
ARG ARCH=
|
||||||
|
FROM mcr.microsoft.com/dotnet/sdk:6.0.404-alpine3.16 AS builder
|
||||||
WORKDIR /src
|
WORKDIR /src
|
||||||
COPY src /src/
|
COPY src /src/
|
||||||
RUN dotnet publish -c Release /src/FakeRelay.sln -o /app
|
RUN dotnet publish -c Release /src/FakeRelay.sln -o /app
|
||||||
|
|
||||||
FROM mcr.microsoft.com/dotnet/aspnet:6.0.11-alpine3.16
|
FROM mcr.microsoft.com/dotnet/aspnet:6.0.12-alpine3.16-${ARCH}
|
||||||
VOLUME ["/data"]
|
VOLUME ["/data"]
|
||||||
ENV CONFIG_PATH=/data/config.json
|
ENV CONFIG_PATH=/data/config.json
|
||||||
COPY --from=builder /app /app
|
COPY --from=builder /app /app
|
||||||
|
Loading…
Reference in New Issue
Block a user