This commit is contained in:
NianBroken
2024-02-14 17:05:49 +08:00 Unverified
parent 08aad1bf5e
commit b2d5ba7d94
3 changed files with 34 additions and 6 deletions
+25
View File
@@ -0,0 +1,25 @@
name: Date Workflow
on:
workflow_dispatch:
jobs:
job1:
name: Get Current Date
runs-on: ubuntu-latest
outputs:
date: ${{ steps.set-date.outputs.date }} # 定义作业1的输出变量
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Set Date Variable
id: set-date
run: echo "::set-output name=date::2020"
job2:
name: Output Date from Job 1
runs-on: ubuntu-latest
needs: job1
steps:
- name: Print Date from Job 1
run: echo "The date from Job 1 is ${{ needs.job1.outputs.date }}"