Skip to content

Commit

Permalink
Add Web Admin docker image
Browse files Browse the repository at this point in the history
  • Loading branch information
oveldman committed Mar 2, 2024
1 parent 89c4d0a commit 7ae31c0
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 2 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/build-admin-web.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Create and publish an admin web Docker image

on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}-admin-web

jobs:
build-and-push-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: ./sources
file: ./sources/Clients.Admin/Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Create and publish a Docker image
name: Create and publish a backend Docker image

on:
push:
Expand Down
2 changes: 2 additions & 0 deletions sources/Clients.Admin/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ EXPOSE 8081
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
ARG BUILD_CONFIGURATION=Release
WORKDIR /src
COPY ["Directory.Build.props", "/src"]
COPY ["Directory.Packages.props", "/src"]
COPY ["Clients.Admin/Clients.Admin.csproj", "Clients.Admin/"]
RUN dotnet restore "Clients.Admin/Clients.Admin.csproj"
COPY . .
Expand Down
3 changes: 2 additions & 1 deletion sources/MadWorldNL.Identity.sln
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Workflows", "Workflows", "{6612E52A-5F38-4585-8F9C-F0F027020BBD}"
ProjectSection(SolutionItems) = preProject
..\.github\workflows\sonarcube.yml = ..\.github\workflows\sonarcube.yml
..\.github\workflows\build.yaml = ..\.github\workflows\build.yaml
..\.github\workflows\build-backend.yaml = ..\.github\workflows\build-backend.yaml
..\.github\workflows\build-admin-web.yaml = ..\.github\workflows\build-admin-web.yaml
EndProjectSection
EndProject
Global
Expand Down

0 comments on commit 7ae31c0

Please sign in to comment.