Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .github/workflows/lexbox-api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- uses: docker/setup-buildx-action@bb05f3f5519dd87d3ba754cc423b652a5edd6d2c # v4.2.0

- uses: docker/build-push-action@53b7df96c91f9c12dcc8a07bcb9ccacbed38856a # v7.3.0
with:
context: backend
Expand All @@ -104,3 +106,8 @@ jobs:
push: ${{ !env.ACT && github.repository == 'sillsdev/languageforge-lexbox' && github.event.pull_request.head.repo.fork != true }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
# Persist build layers across runs via a registry cache image on ghcr.
# Only export when we can push (repo, non-fork); import is always safe.
provenance: false
cache-from: type=registry,ref=${{ env.IMAGE_NAME }}:buildcache
cache-to: ${{ (!env.ACT && github.repository == 'sillsdev/languageforge-lexbox' && github.event.pull_request.head.repo.fork != true) && format('type=registry,ref={0}:buildcache,mode=max', env.IMAGE_NAME) || '' }}
7 changes: 7 additions & 0 deletions .github/workflows/lexbox-fw-headless.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- uses: docker/setup-buildx-action@bb05f3f5519dd87d3ba754cc423b652a5edd6d2c # v4.2.0

- uses: docker/build-push-action@53b7df96c91f9c12dcc8a07bcb9ccacbed38856a # v7.3.0
with:
context: backend
Expand All @@ -95,3 +97,8 @@ jobs:
push: ${{ !env.ACT && github.repository == 'sillsdev/languageforge-lexbox' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
# Persist build layers across runs via a registry cache image on ghcr.
# Only export when we can push (repo); import is always safe.
provenance: false
cache-from: type=registry,ref=${{ env.IMAGE_NAME }}:buildcache
cache-to: ${{ (!env.ACT && github.repository == 'sillsdev/languageforge-lexbox') && format('type=registry,ref={0}:buildcache,mode=max', env.IMAGE_NAME) || '' }}
7 changes: 7 additions & 0 deletions .github/workflows/lexbox-hgweb.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ jobs:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
-
uses: docker/setup-buildx-action@bb05f3f5519dd87d3ba754cc423b652a5edd6d2c # v4.2.0
-
uses: docker/build-push-action@53b7df96c91f9c12dcc8a07bcb9ccacbed38856a # v7.3.0
with:
Expand All @@ -78,6 +80,11 @@ jobs:
push: ${{ !env.ACT }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
# Persist build layers across runs via a registry cache image on ghcr.
# Only export when we can push (auth present); import is always safe.
provenance: false
cache-from: type=registry,ref=${{ env.IMAGE_NAME }}:buildcache
cache-to: ${{ !env.ACT && format('type=registry,ref={0}:buildcache,mode=max', env.IMAGE_NAME) || '' }}
Comment thread
hahn-kev marked this conversation as resolved.
Outdated
deploy-hgweb:
uses: ./.github/workflows/deploy.yaml
if: ${{github.ref == 'refs/heads/develop' && github.event_name == 'push'}}
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/lexbox-ui.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- uses: docker/setup-buildx-action@bb05f3f5519dd87d3ba754cc423b652a5edd6d2c # v4.2.0

- uses: docker/build-push-action@53b7df96c91f9c12dcc8a07bcb9ccacbed38856a # v7.3.0
with:
context: frontend
Expand All @@ -77,3 +79,8 @@ jobs:
push: ${{ !env.ACT && github.repository == 'sillsdev/languageforge-lexbox' && github.event.pull_request.head.repo.fork != true }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
# Persist build layers across runs via a registry cache image on ghcr.
# Only export when we can push (repo, non-fork); import is always safe.
provenance: false
cache-from: type=registry,ref=${{ env.IMAGE_NAME }}:buildcache
cache-to: ${{ (!env.ACT && github.repository == 'sillsdev/languageforge-lexbox' && github.event.pull_request.head.repo.fork != true) && format('type=registry,ref={0}:buildcache,mode=max', env.IMAGE_NAME) || '' }}
22 changes: 13 additions & 9 deletions backend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,20 @@ EXPOSE 443

FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build

COPY . .
# WORKDIR /src
# Copy the main source project files
# COPY */*.csproj ./
#
# move them into the proper sub folders, based on the name of the project
# RUN for file in $(ls *.csproj); do mkdir -p ${file%.*}/ && mv $file ${file%.*}/; done
# Restore first, using only the project/props files, so this layer is cached and
# only re-runs when a .csproj or package version changes — not on every source
# edit. Keep this list in sync with LexBoxApi's ProjectReference graph; a missing
# entry makes the restore below fail loudly at build time.
COPY *.props ./
COPY LexBoxApi/LexBoxApi.csproj LexBoxApi/
COPY LexCore/LexCore.csproj LexCore/
COPY LexData/LexData.csproj LexData/
COPY LfClassicData/LfClassicData.csproj LfClassicData/
COPY SyncReverseProxy/SyncReverseProxy.csproj SyncReverseProxy/
COPY FwLite/MiniLcm/MiniLcm.csproj FwLite/MiniLcm/
RUN --mount=type=cache,target=/root/.nuget/packages dotnet restore "LexBoxApi/LexBoxApi.csproj"
# COPY . .
# WORKDIR "/LexBoxApi"

COPY . .

ARG APP_VERSION
LABEL version=$APP_VERSION
Expand Down
17 changes: 16 additions & 1 deletion backend/FwHeadless/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,24 @@ EXPOSE 443

FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build

COPY . .
# Restore first, using only the project/props files, so this layer is cached and
# only re-runs when a .csproj or package version changes — not on every source
# edit. Keep this list in sync with FwHeadless's ProjectReference graph; a missing
# entry makes the restore below fail loudly at build time.
COPY *.props ./
COPY FwHeadless/FwHeadless.csproj FwHeadless/
COPY FixFwData/FixFwData.csproj FixFwData/
COPY LexCore/LexCore.csproj LexCore/
COPY LexData/LexData.csproj LexData/
COPY WebServiceDefaults/WebServiceDefaults.csproj WebServiceDefaults/
COPY FwLite/MiniLcm/MiniLcm.csproj FwLite/MiniLcm/
COPY FwLite/FwDataMiniLcmBridge/FwDataMiniLcmBridge.csproj FwLite/FwDataMiniLcmBridge/
COPY FwLite/LcmCrdt/LcmCrdt.csproj FwLite/LcmCrdt/
COPY FwLite/FwLiteProjectSync/FwLiteProjectSync.csproj FwLite/FwLiteProjectSync/
RUN --mount=type=cache,target=/root/.nuget/packages dotnet restore "FwHeadless/FwHeadless.csproj"

COPY . .

ARG APP_VERSION
LABEL version=$APP_VERSION

Expand Down
Loading