test: rename workflows to .yml and gate downstream on prepare success
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
name: Print One
|
||||
|
||||
on:
|
||||
workflow_run:
|
||||
workflows: ["Prepare"]
|
||||
types:
|
||||
- completed
|
||||
|
||||
jobs:
|
||||
print:
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ github.event.workflow_run.conclusion == 'success' }}
|
||||
steps:
|
||||
- name: 每 10 秒打印一次数字
|
||||
run: |
|
||||
echo "[$(date '+%F %T')] Print One 启动 (上游 Prepare 结论: ${{ github.event.workflow_run.conclusion }})"
|
||||
for i in $(seq 1 5); do
|
||||
echo "[$(date '+%F %T')] Print One -> $i"
|
||||
sleep 10
|
||||
done
|
||||
echo "[$(date '+%F %T')] Print One 完成"
|
||||
Reference in New Issue
Block a user