|
15 | 15 | default: "" |
16 | 16 | required: false |
17 | 17 | type: string |
| 18 | + LOCAL_TEST_ARTIFACT_RUN_ID: |
| 19 | + description: "Workflow run ID for local artifact download (leave empty for normal CI)" |
| 20 | + required: false |
| 21 | + default: "" |
18 | 22 | workspace: |
19 | 23 | description: "Select a widget to test (Default will run all)" |
20 | 24 | required: true |
|
70 | 74 |
|
71 | 75 | # Use default name in case no input |
72 | 76 | run-name: ${{ github.event.inputs.run_name || 'Run Native Pipeline' }} |
| 77 | +env: |
| 78 | + LOCAL_TEST_ARTIFACT_RUN_ID: ${{ github.event.inputs.LOCAL_TEST_ARTIFACT_RUN_ID || '' }} |
73 | 79 | permissions: |
74 | 80 | packages: write |
75 | 81 | jobs: |
@@ -485,35 +491,15 @@ jobs: |
485 | 491 | uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7 |
486 | 492 | with: |
487 | 493 | name: mda |
488 | | - |
489 | | - # USED ONLY FOR TESTING PURPOSE - TO SKIP APP BUILD PART AND DOWNLOAD FROM SPECIFIC RUN |
490 | | - # - name: "Install GitHub CLI" |
491 | | - # run: | |
492 | | - # curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg |
493 | | - # sudo chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg |
494 | | - # echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null |
495 | | - # sudo apt update |
496 | | - # sudo apt install gh |
497 | | - # - name: "Authenticate GitHub CLI" |
498 | | - # run: | |
499 | | - # unset GITHUB_TOKEN |
500 | | - # echo "${{ secrets.GITHUB_TOKEN }}" | gh auth login --with-token |
501 | | - # - name: "Fetch artifacts from run 676" |
502 | | - # id: fetch-artifacts |
503 | | - # run: | |
504 | | - # artifacts_url=$(gh api "repos/${{ github.repository }}/actions/runs/13453887084/artifacts" --jq '.artifacts[] | select(.name == "android-app") | .archive_download_url') |
505 | | - # echo "Artifacts URL: $artifacts_url" |
506 | | - # echo "artifacts_url=$artifacts_url" >> $GITHUB_ENV |
507 | | - # - name: "Download Android app" |
508 | | - # if: env.artifacts_url != '' |
509 | | - # run: | |
510 | | - # if [ -z "$artifacts_url" ]; then |
511 | | - # echo "No artifacts URL found." |
512 | | - # exit 1 |
513 | | - # fi |
514 | | - # curl -L -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" -o android-app.zip "$artifacts_url" |
515 | | - # unzip android-app.zip -d android-app |
516 | | - |
| 494 | + # Used only for local testing, will be empty on GitHub |
| 495 | + - name: "Download Android app from specific run" |
| 496 | + if: ${{ env.LOCAL_TEST_ARTIFACT_RUN_ID != '' }} |
| 497 | + uses: ./.github/actions/use-arficats-from-specific-run |
| 498 | + with: |
| 499 | + artifact_name: android-app |
| 500 | + run_id: ${{ env.LOCAL_TEST_ARTIFACT_RUN_ID }} |
| 501 | + output_dir: android-app |
| 502 | + platform: android |
517 | 503 | - name: "Download Android app" |
518 | 504 | uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7 |
519 | 505 | with: |
@@ -594,31 +580,15 @@ jobs: |
594 | 580 | uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7 |
595 | 581 | with: |
596 | 582 | name: mda |
597 | | - |
598 | | - # USED ONLY FOR TESTING PURPOSE - TO SKIP APP BUILD PART AND DOWNLOAD APP FROM SPECIFIC RUN |
599 | | - # - name: "Install GitHub CLI" |
600 | | - # run: | |
601 | | - # brew install gh |
602 | | - # - name: "Authenticate GitHub CLI" |
603 | | - # run: | |
604 | | - # unset GITHUB_TOKEN |
605 | | - # echo "${{ secrets.GITHUB_TOKEN }}" | gh auth login --with-token |
606 | | - # - name: "Fetch artifacts from run 676" |
607 | | - # id: fetch-artifacts |
608 | | - # run: | |
609 | | - # artifacts_url=$(gh api "repos/${{ github.repository }}/actions/runs/13453887084/artifacts" --jq '.artifacts[] | select(.name == "ios-app") | .archive_download_url') |
610 | | - # echo "Artifacts URL: $artifacts_url" |
611 | | - # echo "artifacts_url=$artifacts_url" >> $GITHUB_ENV |
612 | | - # - name: "Download iOS app" |
613 | | - # if: env.artifacts_url != '' |
614 | | - # run: | |
615 | | - # if [ -z "$artifacts_url" ]; then |
616 | | - # echo "No artifacts URL found." |
617 | | - # exit 1 |
618 | | - # fi |
619 | | - # curl -L -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" -o ios-app.zip "$artifacts_url" |
620 | | - # unzip ios-app.zip -d ios-app |
621 | | - |
| 583 | + # Used only for local testing, will be empty on GitHub |
| 584 | + - name: "Download iOS app from specific run" |
| 585 | + if: ${{ env.LOCAL_TEST_ARTIFACT_RUN_ID != '' }} |
| 586 | + uses: ./.github/actions/use-arficats-from-specific-run |
| 587 | + with: |
| 588 | + artifact_name: ios-app |
| 589 | + run_id: ${{ env.LOCAL_TEST_ARTIFACT_RUN_ID }} |
| 590 | + output_dir: ios-app |
| 591 | + platform: ios |
622 | 592 | - name: "Download iOS app" |
623 | 593 | uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7 |
624 | 594 | with: |
|
0 commit comments