Skip to content

Commit 347efcd

Browse files
committed
.
1 parent e828a1e commit 347efcd

2 files changed

Lines changed: 29 additions & 0 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Deploy Image
2+
on:
3+
push:
4+
branches: [ master ]
5+
jobs:
6+
deploy:
7+
runs-on: ubuntu-latest
8+
permissions:
9+
packages: write
10+
steps:
11+
- uses: actions/checkout@v2
12+
- name: Build the Docker image
13+
run: docker build . --file Dockerfile --tag ghcr.io/krisdb2009/smtp2graph:latest
14+
- name: Login
15+
run: echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u krisdb2009 --password-stdin
16+
- name: Publish the Docker image
17+
run: docker push ghcr.io/krisdb2009/smtp2graph:latest

Dockerfile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build
2+
COPY . /build
3+
WORKDIR /build
4+
RUN dotnet restore
5+
RUN dotnet publish SMTP2Graph -c Release -o /SMTP2Graph --no-restore
6+
FROM mcr.microsoft.com/dotnet/runtime:9.0
7+
WORKDIR /SMTP2Graph
8+
COPY --from=build /SMTP2Graph .
9+
ENV TENANT_ID=""
10+
ENV CLIENT_ID=""
11+
ENV CLIENT_SECRET=""
12+
ENTRYPOINT ./SMTP2Graph

0 commit comments

Comments
 (0)