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:
@@ -1,7 +1,10 @@
|
||||
name: Build Android APK
|
||||
|
||||
on:
|
||||
push:
|
||||
workflow_run:
|
||||
workflows: ["Version Static Assets"]
|
||||
types:
|
||||
- completed
|
||||
branches: [main]
|
||||
workflow_dispatch:
|
||||
|
||||
@@ -11,10 +14,17 @@ permissions:
|
||||
jobs:
|
||||
build:
|
||||
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:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: main
|
||||
fetch-depth: 1
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
|
||||
Reference in New Issue
Block a user