|
17 | 17 | name: Run RPS on AppKit-E8 Hardware |
18 | 18 | on: |
19 | 19 | workflow_dispatch: |
20 | | - workflow_run: |
21 | | - workflows: ["Build RPS for AppKit-E8 Hardware"] |
22 | | - types: [completed] |
23 | | - branches: [main] |
| 20 | + workflow_call: |
24 | 21 |
|
25 | 22 | permissions: |
26 | 23 | contents: read |
27 | 24 | actions: read |
28 | 25 |
|
29 | 26 | jobs: |
30 | | - fork-restricted: |
31 | | - name: Private runner restricted |
32 | | - # trigger this only for forks, to prevent them from action runout |
33 | | - if: ${{ github.repository != 'Arm-Examples/ModelNova' }} |
| 27 | + FORK-CHECK: |
| 28 | + if: ${{ github.repository != 'Arm-Examples/ModelNova' && github.event_name == 'workflow_dispatch' }} |
34 | 29 | runs-on: ubuntu-latest |
35 | 30 |
|
36 | 31 | steps: |
37 | | - - name: Notify runner restriction |
| 32 | + - name: Notify Runner Restriction |
38 | 33 | run: | |
39 | 34 | MESSAGE="Workflows on the private runner are restricted for security reasons." |
40 | | - GUIDANCE="Contributors can validate changes using GitHub-hosted runners." |
41 | 35 | echo "${MESSAGE}" |
42 | | - echo "${GUIDANCE}" |
43 | 36 | { |
44 | 37 | echo "## ⚠️ AppKit-E8 hardware test was not run" |
45 | 38 | echo "" |
46 | 39 | echo "${MESSAGE}" |
47 | | - echo "" |
48 | | - echo "${GUIDANCE}" |
49 | 40 | } >> "$GITHUB_STEP_SUMMARY" |
50 | 41 | exit 1 |
51 | 42 |
|
52 | 43 | CI: |
53 | | - if: >- |
54 | | - ${{ (github.event_name == 'workflow_dispatch' || |
55 | | - (github.event.workflow_run.conclusion == 'success' && |
56 | | - github.event.workflow_run.head_repository.full_name == 'Arm-Examples/ModelNova')) }} |
| 44 | + if: ${{ ((github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' ) && github.repository == 'Arm-Examples/ModelNova') }} |
57 | 45 | runs-on: [self-hosted, rsp-p5-01] |
58 | 46 |
|
59 | 47 | steps: |
|
63 | 51 | token: ${{ github.token }} |
64 | 52 |
|
65 | 53 | - name: Download Build Artifact |
66 | | - if: ${{ github.event_name == 'workflow_run' }} |
67 | | - uses: dawidd6/action-download-artifact@v17 |
| 54 | + uses: actions/download-artifact@v8 |
68 | 55 | with: |
69 | | - run_id: ${{ github.event.workflow_run.id }} |
70 | 56 | name: RPS_AppKit-E8-U85_HIL |
71 | 57 | path: ./RockPaperScissors/AppKit-E8_USB/out |
72 | 58 |
|
|
0 commit comments