Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
10 changes: 8 additions & 2 deletions .github/workflows/pr-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ on:
paths-ignore:
- '**.md'
- 'fastlane/**'
workflow_dispatch:
inputs:
pr_number:
description: "Pull request number"
required: true
type: string

jobs:
build:
Expand Down Expand Up @@ -35,15 +41,15 @@ jobs:
if: success()
uses: actions/upload-artifact@v4
with:
name: compressor-debug-pr-${{ github.event.pull_request.number }}
name: compressor-debug-pr-${{ github.event.inputs.pr_number || github.event.pull_request.number }}
path: app/build/outputs/apk/debug/app-debug.apk
retention-days: 5

- name: Save PR metadata and logs
if: always()
run: |
mkdir -p pr_data
echo "${{ github.event.pull_request.number }}" > pr_data/PR_NUMBER
echo "${{ github.event.inputs.pr_number || github.event.pull_request.number }}" > pr_data/PR_NUMBER
echo "${{ job.status }}" > pr_data/STATUS
if [ -f build.log ]; then
tail -n 150 build.log > pr_data/trimmed_log.txt
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pr-commands.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,11 @@ jobs:

console.log(`Triggering rebuild for branch: ${pr.head.ref}`);

// 4. Trigger the main android.yml workflow
// 4. Trigger the PR build workflow
await github.rest.actions.createWorkflowDispatch({
owner,
repo: context.repo.repo,
workflow_id: 'android.yml',
workflow_id: 'pr-build.yml',
ref: pr.head.ref, // IMPORTANT: Run on the PR's branch
inputs: {
pr_number: context.issue.number.toString()
Expand Down
Loading