Skip to content

Commit beb370d

Browse files
committed
Add Docker publish
1 parent a0d1666 commit beb370d

File tree

2 files changed

+43
-3
lines changed

2 files changed

+43
-3
lines changed

.github/workflows/ci.yaml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
publish-docker-image:
10+
name: Publish Docker image
11+
runs-on: ubuntu-latest
12+
13+
permissions:
14+
contents: read
15+
packages: write
16+
17+
steps:
18+
- name: Checkout repository
19+
uses: actions/checkout@v4
20+
21+
- name: Login to GHCR
22+
uses: docker/login-action@v3
23+
with:
24+
registry: ghcr.io
25+
username: ${{ github.actor }}
26+
password: ${{ secrets.GITHUB_TOKEN }}
27+
28+
- name: Set up QEMU
29+
uses: docker/setup-qemu-action@v3
30+
31+
- name: Set up Docker Buildx
32+
uses: docker/setup-buildx-action@v3
33+
34+
- name: Build and push
35+
uses: docker/build-push-action@v6
36+
with:
37+
platforms: linux/amd64,linux/arm64
38+
push: true
39+
tags: ghcr.io/louismt/ddns-proxy:latest

Dockerfile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
1-
FROM mcr.microsoft.com/dotnet/sdk:9.0-alpine AS build
1+
FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build
22

3-
RUN apk add clang build-base zlib-dev
3+
RUN apt-get update && \
4+
apt-get install -y clang zlib1g-dev
45

56
WORKDIR /app
67

78
COPY . .
89

910
RUN dotnet publish src/Core -c Release -o /build
1011

11-
FROM mcr.microsoft.com/dotnet/runtime-deps:9.0-alpine
12+
FROM mcr.microsoft.com/dotnet/runtime-deps:9.0
1213

1314
WORKDIR /app
1415

0 commit comments

Comments
 (0)