fix: ensure APK build runs after asset versioning

- Remove direct push trigger from build-apk workflow
- Set build-apk to run only after version-assets completes
- Prevent race condition where APK is built with old asset hashes
- Ensure checkout fetches latest version from main branch
This commit is contained in:
2026-01-31 08:19:15 +01:00
parent 2e5f30451c
commit d3349869e8

View File

@@ -1,7 +1,10 @@
name: Build Android APK name: Build Android APK
on: on:
push: workflow_run:
workflows: ["Version Static Assets"]
types:
- completed
branches: [main] branches: [main]
workflow_dispatch: workflow_dispatch:
@@ -11,10 +14,17 @@ permissions:
jobs: jobs:
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
# Only run if triggered by workflow_dispatch or successful completion of version-assets
if: >
github.event_name == 'workflow_dispatch' ||
(github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success')
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v4 uses: actions/checkout@v4
with:
ref: main
fetch-depth: 1
- name: Setup Node.js - name: Setup Node.js
uses: actions/setup-node@v4 uses: actions/setup-node@v4