File tree Expand file tree Collapse file tree 3 files changed +10
-5
lines changed
Expand file tree Collapse file tree 3 files changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -41,6 +41,7 @@ Check out the [flow CI workflow](https://github.com/jahvon/flow/blob/main/.githu
4141| `working-directory` | Directory to run flow from | `.` |
4242| `timeout` | Timeout for executable execution | `30m` |
4343| `continue-on-error` | Continue workflow if flow executable fails | `false` |
44+ | `upload` | Whether to upload flow logs as an artifact | `false` |
4445
4546# # Outputs
4647
Original file line number Diff line number Diff line change @@ -122,12 +122,13 @@ runs:
122122 VAULT_KEY : ${{ inputs.vault-key }}
123123 CONTINUE_ON_ERROR : ${{ inputs.continue-on-error }}
124124 GITHUB_OUTPUT : ${{ github.outputs }}
125+ CAPTURE : ${{ inputs.upload == 'true' }}
125126
126127 - name : Upload flow logs
127128 uses : actions/upload-artifact@v4
128129 if : ${{ inputs.upload == 'true' && steps.flow-exec.outputs.exit-code != '0' }}
129130 with :
130- name : flow-logs-${{ github.run_id }}
131+ name : flow-executable- logs-${{ github.job }}
131132 path : ${{ inputs.working-directory }}/executable_output.txt
132133 retention-days : 1
133134
Original file line number Diff line number Diff line change @@ -13,13 +13,16 @@ set +e
1313
1414echo " 🚀 Executing: flow $EXECUTABLE_INPUT "
1515
16- if [ " ${CONTINUE_ON_ERROR :- false} " = " true" ]; then
16+ if [ " $CAPTURE " = " true" ]; then
1717 flow $EXECUTABLE_INPUT 2>&1 | tee executable_output.txt
18- exit_code=$?
18+ else
19+ flow $EXECUTABLE_INPUT
20+ fi
21+ exit_code=$?
22+
23+ if [ " ${CONTINUE_ON_ERROR:- false} " = " true" ]; then
1924 echo " 📊 Executable completed with exit code: $exit_code (continue-on-error enabled)"
2025else
21- flow $EXECUTABLE_INPUT 2>&1 | tee executable_output.txt
22- exit_code=$?
2326 if [ $exit_code -ne 0 ]; then
2427 echo " ❌ Executable failed with exit code $exit_code "
2528 echo " ::endgroup::"
You can’t perform that action at this time.
0 commit comments