This commit is contained in:
+13
-14
@@ -15,20 +15,19 @@ jobs:
|
|||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v3
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
- name: build database
|
- name: build and push database
|
||||||
run: |
|
run: |
|
||||||
docker buildx build --platform=linux/amd64,linux/arm64 -t mistox-sql ./database
|
docker buildx build \
|
||||||
|
--platform=linux/amd64,linux/arm64 \
|
||||||
|
-t docker.mistox.net/mistox-sql \
|
||||||
|
--push \
|
||||||
|
./database
|
||||||
|
|
||||||
- name: build server
|
- name: build and push server
|
||||||
run: |
|
run: |
|
||||||
docker buildx build --platform=linux/amd64,linux/arm64 --build-arg BASE_URL=https://mistox.com -t mistox-website .
|
docker buildx build \
|
||||||
|
--platform=linux/amd64,linux/arm64 \
|
||||||
- name: publish database
|
--build-arg BASE_URL=https://mistox.com \
|
||||||
run: |
|
-t docker.mistox.net/mistox-website \
|
||||||
docker image tag mistox-sql docker.mistox.net/mistox-sql && \
|
--push \
|
||||||
docker push docker.mistox.net/mistox-sql
|
.
|
||||||
|
|
||||||
- name: publish server
|
|
||||||
run: |
|
|
||||||
docker image tag mistox-website docker.mistox.net/mistox-website && \
|
|
||||||
docker push docker.mistox.net/mistox-website
|
|
||||||
+4
-4
@@ -40,15 +40,15 @@ RUN dotnet restore './MistoxWebsite.Server.csproj'
|
|||||||
COPY ./src/MistoxWebsite.Server/ ./
|
COPY ./src/MistoxWebsite.Server/ ./
|
||||||
|
|
||||||
# Get the target arch
|
# Get the target arch
|
||||||
ARG TARGETOS TARGETARCH
|
ARG TARGETARCH
|
||||||
|
|
||||||
# Build the source
|
# Build the source
|
||||||
RUN set -e && \
|
RUN set -e && \
|
||||||
if [ "$TARGETARCH" = "arm64" ]; then RID="arm64"; \
|
if [ "$TARGETARCH" = "arm64" ]; then RID="linux-arm64"; \
|
||||||
elif [ "$TARGETARCH" = "amd64" ]; then RID="x64"; \
|
elif [ "$TARGETARCH" = "amd64" ]; then RID="linux-x64"; \
|
||||||
else echo "Unsupported ARCH: $TARGETARCH"; exit 1; \
|
else echo "Unsupported ARCH: $TARGETARCH"; exit 1; \
|
||||||
fi && \
|
fi && \
|
||||||
dotnet publish './MistoxWebsite.Server.csproj' -c Release -r linux-$RID -o /app/publish
|
dotnet publish './MistoxWebsite.Server.csproj' -c Release -r ${RID} -o /app/publish
|
||||||
|
|
||||||
################
|
################
|
||||||
## Publish ##
|
## Publish ##
|
||||||
|
|||||||
Reference in New Issue
Block a user