Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 82243600ac |
@@ -13,22 +13,10 @@ jobs:
|
|||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Setup .NET (resilient)
|
- name: Setup .NET
|
||||||
shell: bash
|
uses: actions/setup-dotnet@v4
|
||||||
# actions/setup-dotnet on this single self-hosted runner intermittently
|
with:
|
||||||
# leaves a partial extraction in the shared tool-cache ("tar: Cannot open:
|
dotnet-version: '9.0.x'
|
||||||
# File exists") or corrupts the SDK download. Install into a clean private
|
|
||||||
# dir via dotnet-install.sh and retry once on failure, mirroring the
|
|
||||||
# npm ci / NuGet retries elsewhere in this workflow.
|
|
||||||
run: |
|
|
||||||
install() {
|
|
||||||
curl -fsSL https://dot.net/v1/dotnet-install.sh -o /tmp/dotnet-install.sh
|
|
||||||
rm -rf "$HOME/.dotnet"
|
|
||||||
bash /tmp/dotnet-install.sh --channel 9.0 --install-dir "$HOME/.dotnet"
|
|
||||||
}
|
|
||||||
install || ( echo "dotnet install failed ($?) — retrying once..." && install )
|
|
||||||
echo "$HOME/.dotnet" >> "$GITHUB_PATH"
|
|
||||||
"$HOME/.dotnet/dotnet" --info
|
|
||||||
|
|
||||||
- name: Setup Node
|
- name: Setup Node
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
@@ -51,12 +39,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
node -v
|
node -v
|
||||||
npm -v
|
npm -v
|
||||||
# npm ci occasionally segfaults on the runner (SIGSEGV/139, a memory/native
|
npm ci --no-audit --no-fund
|
||||||
# flake). Retry once with a clean node_modules before failing the job.
|
|
||||||
npm ci --no-audit --no-fund \
|
|
||||||
|| ( echo "npm ci failed ($?) — cleaning node_modules and retrying once..." \
|
|
||||||
&& rm -rf node_modules \
|
|
||||||
&& npm ci --no-audit --no-fund )
|
|
||||||
|
|
||||||
- name: Test frontend
|
- name: Test frontend
|
||||||
working-directory: job-tracker-ui
|
working-directory: job-tracker-ui
|
||||||
|
|||||||
@@ -9,14 +9,7 @@ COPY Models/ Models/
|
|||||||
COPY JobTrackerApi/ JobTrackerApi/
|
COPY JobTrackerApi/ JobTrackerApi/
|
||||||
COPY JobTrackerBackend/ JobTrackerBackend/
|
COPY JobTrackerBackend/ JobTrackerBackend/
|
||||||
|
|
||||||
# Retry once after clearing NuGet caches. Transient download corruption on the
|
RUN dotnet publish JobTrackerApi/JobTrackerApi.csproj -c Release -o /app/publish /p:UseAppHost=false
|
||||||
# build host can trip NU3008 ("package integrity check failed / has changed since
|
|
||||||
# it was signed") while restoring a transitive package; clearing the caches and
|
|
||||||
# re-downloading resolves it.
|
|
||||||
RUN dotnet publish JobTrackerApi/JobTrackerApi.csproj -c Release -o /app/publish /p:UseAppHost=false \
|
|
||||||
|| ( echo "Publish failed — clearing NuGet caches and retrying once..." \
|
|
||||||
&& dotnet nuget locals all --clear \
|
|
||||||
&& dotnet publish JobTrackerApi/JobTrackerApi.csproj -c Release -o /app/publish /p:UseAppHost=false )
|
|
||||||
|
|
||||||
FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS runtime
|
FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS runtime
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user