Fix frontend workflow using assets instead of cache (#376)

This commit is contained in:
Flaminel
2025-11-30 15:48:53 +02:00
committed by GitHub
parent fbb2bba3b6
commit d28ab42303
5 changed files with 21 additions and 33 deletions

View File

@@ -4,21 +4,8 @@ on:
workflow_call:
jobs:
# Build frontend once and share with all platform builds
restore-frontend:
runs-on: ubuntu-latest
steps:
- name: Restore frontend from cache
id: restore-frontend
uses: actions/cache/restore@v4
with:
path: code/frontend/dist/ui/browser
key: frontend-dist-${{ github.sha }}-${{ github.run_id }}
fail-on-cache-miss: true
# Build for each platform in parallel using matrix strategy
build-platform:
needs: restore-frontend
runs-on: ubuntu-latest
strategy:
fail-fast: true
@@ -89,12 +76,11 @@ jobs:
restore-keys: |
${{ runner.os }}-nuget-
- name: Restore frontend from cache
uses: actions/cache/restore@v4
- name: Download frontend artifact
uses: actions/download-artifact@v4
with:
name: frontend-dist
path: code/frontend/dist/ui/browser
key: frontend-dist-${{ github.sha }}-${{ github.run_id }}
fail-on-cache-miss: true
- name: Install dependencies and restore
run: |

View File

@@ -38,9 +38,9 @@ jobs:
npm ci
npm run build
- name: Cache frontend build
id: cache-frontend
uses: actions/cache/save@v4
- name: Upload frontend artifact
uses: actions/upload-artifact@v4
with:
name: frontend-dist
path: code/frontend/dist/ui/browser
key: frontend-dist-${{ github.sha }}-${{ github.run_id }}
retention-days: 1

View File

@@ -68,13 +68,11 @@ jobs:
token: ${{ env.REPO_READONLY_PAT }}
fetch-depth: 0
- name: Restore frontend from cache
id: restore-frontend
uses: actions/cache/restore@v4
- name: Download frontend artifact
uses: actions/download-artifact@v4
with:
name: frontend-dist
path: code/frontend/dist/ui/browser
key: frontend-dist-${{ github.sha }}-${{ github.run_id }}
fail-on-cache-miss: true
- name: Setup .NET
uses: actions/setup-dotnet@v4

View File

@@ -50,13 +50,11 @@ jobs:
ref: ${{ github.ref_name }}
token: ${{ env.REPO_READONLY_PAT }}
- name: Restore frontend from cache
id: restore-frontend
uses: actions/cache/restore@v4
- name: Download frontend artifact
uses: actions/download-artifact@v4
with:
name: frontend-dist
path: code/frontend/dist/ui/browser
key: frontend-dist-${{ github.sha }}-${{ github.run_id }}
fail-on-cache-miss: true
- name: Setup .NET
uses: actions/setup-dotnet@v4

View File

@@ -10,6 +10,11 @@ on:
description: 'Version to release (e.g., 1.0.0)'
required: false
default: ''
skip_docker:
description: 'Skip Docker build and push'
type: boolean
required: false
default: false
jobs:
# Validate release
@@ -19,7 +24,7 @@ jobs:
app_version: ${{ steps.version.outputs.app_version }}
release_version: ${{ steps.version.outputs.release_version }}
is_tag: ${{ steps.version.outputs.is_tag }}
steps:
- name: Checkout
uses: actions/checkout@v4
@@ -47,7 +52,7 @@ jobs:
echo "app_version=$app_version" >> $GITHUB_OUTPUT
echo "release_version=$release_version" >> $GITHUB_OUTPUT
echo "is_tag=$is_tag" >> $GITHUB_OUTPUT
echo "🏷️ Release Version: $release_version"
echo "📱 App Version: $app_version"
echo "🔖 Is Tag: $is_tag"
@@ -84,6 +89,7 @@ jobs:
# Build and push Docker image(s)
build-docker:
if: ${{ github.event.inputs.skip_docker != 'true' }}
needs: [validate, test]
uses: ./.github/workflows/build-docker.yml
secrets: inherit