|
8 | 8 | ACTIONS_REPO: asterisk-ci-actions |
9 | 9 | ACTIONS_BRANCH: main-test-native |
10 | 10 | SCRIPT_DIR: ${{ github.workspace }}/asterisk-ci-actions/scripts |
| 11 | + GH_TOKEN: ${{secrets.GITHUB_TOKEN}} |
| 12 | + RUN_ID: ${{ github.id }} |
11 | 13 |
|
12 | 14 | jobs: |
13 | | - Setup: |
| 15 | + Job1: |
14 | 16 | runs-on: ubuntu-latest |
15 | 17 | defaults: |
16 | 18 | run: |
17 | 19 | shell: bash |
18 | 20 | steps: |
19 | | - - name: Setup |
| 21 | + - name: DumpEnvironment |
| 22 | + uses: asterisk/asterisk-ci-actions/DumpEnvironmentAction@main |
| 23 | + |
| 24 | + - name: test |
20 | 25 | run: | |
21 | | - # Setup |
22 | | - pwd |
23 | | - wget -qO asterisk-ci-actions.tar.gz \ |
24 | | - https://github.com/${ACTIONS_OWNER}/${ACTIONS_REPO}/archive/refs/heads/${ACTIONS_BRANCH}.tar.gz |
25 | | - tar -xf asterisk-ci-actions.tar.gz --transform="s/^${ACTIONS_REPO}-${ACTIONS_BRANCH}/asterisk-ci-actions/g" |
26 | | - # jq -r '. | from_entries' ${ACTIONS_REPO}/.github/control/asterisk-gh-test.json |
27 | | - sed -i -r -e "s/^vars_/export vars_/g" ${ACTIONS_REPO}/.github/control/asterisk-gh-test.env |
28 | | - source ${ACTIONS_REPO}/.github/control/asterisk-gh-test.env |
29 | | - for VV in ${!vars_@} ; do |
30 | | - echo "$VV=${!VV}" >> "${GITHUB_ENV}" |
31 | | - done |
| 26 | + mkdir logs |
| 27 | + step_summary="" |
| 28 | + step_summary+="FAILURE: rest_api/recording/duration\nFAILURE: rest_api/recording/nominal" |
| 29 | + echo -e "$step_summary" >> logs/STEP_SUMMARY |
| 30 | + exit 1 |
| 31 | + - name: Save Output |
| 32 | + id: save-output |
| 33 | + if: ${{ always() }} |
| 34 | + uses: actions/upload-artifact@v4 |
| 35 | + with: |
| 36 | + name: job1 |
| 37 | + path: | |
| 38 | + logs |
| 39 | +
|
32 | 40 |
|
33 | | - - name: Printenv |
| 41 | + Job2: |
| 42 | + runs-on: ubuntu-latest |
| 43 | + defaults: |
| 44 | + run: |
| 45 | + shell: bash |
| 46 | + steps: |
| 47 | + - name: test |
34 | 48 | run: | |
35 | | - printenv |
| 49 | + mkdir logs |
| 50 | + step_summary="" |
| 51 | + step_summary+="FAILURE: rest_api/recording/XXXXX\nFAILURE: rest_api/recording/YYYYYYY" |
| 52 | + echo -e "$step_summary" >> logs/STEP_SUMMARY |
| 53 | + exit 1 |
| 54 | + - name: Save Output |
| 55 | + id: save-output |
| 56 | + if: ${{ always() }} |
| 57 | + uses: actions/upload-artifact@v4 |
| 58 | + with: |
| 59 | + name: job2 |
| 60 | + path: | |
| 61 | + logs |
| 62 | +
|
| 63 | + Cleanup: |
| 64 | + needs: [Job1, Job2] |
| 65 | + runs-on: ubuntu-latest |
| 66 | + if: ${{ always() }} |
| 67 | + defaults: |
| 68 | + run: |
| 69 | + shell: bash |
| 70 | + steps: |
| 71 | + - name: test |
| 72 | + run: | |
| 73 | + gh --repo ${{ github.repository }} \ |
| 74 | + run download ${RUN_ID} -D run-${RUN_ID} |
| 75 | + find run-${RUN_ID} -name STEP_SUMMARY |
| 76 | + for f in $(find run-${RUN_ID} -name STEP_SUMMARY) ; do |
| 77 | + cat $f >> $GITHUB_STEP_SUMMARY |
| 78 | + done |
| 79 | + cat $GITHUB_STEP_SUMMARY |
| 80 | +
|
36 | 81 |
|
37 | 82 | # - name: DumpEnvironment |
38 | 83 | # uses: asterisk/asterisk-ci-actions/DumpEnvironmentAction@main |
0 commit comments