59
59
prev_conclusion :
60
60
description : If mode == mirror_completed, the conclusion to mirror
61
61
value : ${{ jobs.gate.outputs.prev_conclusion }}
62
+ prev_run_id :
63
+ description : If mode == mirror_completed, the prior run id being mirrored
64
+ value : ${{ jobs.gate.outputs.prev_run_id }}
62
65
63
66
permissions :
64
67
actions : read
72
75
mode : ${{ steps.check.outputs.mode }}
73
76
target_run_id : ${{ steps.check.outputs.target_run_id }}
74
77
prev_conclusion : ${{ steps.check.outputs.prev_conclusion }}
78
+ prev_run_id : ${{ steps.check.outputs.prev_run_id }}
75
79
steps :
76
80
- name : Determine mode
77
81
id : check
@@ -117,6 +121,7 @@ jobs:
117
121
if (active) {
118
122
core.setOutput('mode', 'wait')
119
123
core.setOutput('target_run_id', String(active.id))
124
+ core.setOutput('prev_run_id', String(active.id))
120
125
return
121
126
}
122
127
@@ -126,6 +131,7 @@ jobs:
126
131
if (completed) {
127
132
core.setOutput('mode', 'mirror_completed')
128
133
core.setOutput('prev_conclusion', completed.conclusion || '')
134
+ core.setOutput('prev_run_id', String(completed.id))
129
135
return
130
136
}
131
137
@@ -174,6 +180,7 @@ jobs:
174
180
- name : Mirror result
175
181
run : |
176
182
echo "Previous conclusion: ${{ needs.gate.outputs.prev_conclusion }}"
183
+ echo "Mirroring workflow run: https://github.com/${{ github.repository }}/actions/runs/${{ needs.gate.outputs.prev_run_id }}"
177
184
if [ "${{ needs.gate.outputs.prev_conclusion }}" != "success" ]; then
178
185
echo "Mirroring failure"
179
186
exit 1
0 commit comments