更新 .gitea/workflows/demo.yaml
自动流水线示例 / build (push) Successful in 1m45s Details
自动流水线示例 / upload (ubuntu-latest) (push) Successful in 20s Details
自动流水线示例 / deploy (push) Successful in 16s Details
自动流水线示例 / download (push) Failing after 27s Details
自动流水线示例 / 检查 (push) Successful in 8s Details
自动流水线示例 / 制品上传 (ubuntu-latest, a) (push) Has been skipped Details
自动流水线示例 / 制品上传 (ubuntu-latest, b) (push) Has been skipped Details
自动流水线示例 / 制品上传 (ubuntu-latest, c) (push) Has been skipped Details

发布生产
This commit is contained in:
xiehaijun 2025-07-27 14:19:52 +00:00
parent f5f426ae2e
commit 639f59459b
1 changed files with 5 additions and 3 deletions

View File

@ -221,9 +221,11 @@ jobs:
- run: ls -R my-artifact - run: ls -R my-artifact
- name: 读取跨job文件中的变量 - name: 读取跨job文件中的变量
run: | run: |
version=$(jq -r .version ./my-artifact/meta.json) # first_meta=$(find ./my-artifact -type f -name 'meta.json' | head -n 1) # 返回./my-artifact/**/xx
echo "Version is $version #变量在$GITHUB_ENV中存放,可实现同一个steps可以共享" first_meta=$(find ./my-artifact -type f -name '*.json' -exec realpath {} \; | head -n 1) # 全路径
echo "VERSION=$version" >> $GITHUB_ENV version=$(jq -r .version "$first_meta")
echo "Version is $version"
echo "VERSION=$version" >> $GITHUB_ENV #变量在$GITHUB_ENV中存放,可实现同一个steps可以共享
- name: Use shared version - name: Use shared version
run: echo "读取跨job的变量=$VERSION" run: echo "读取跨job的变量=$VERSION"
- name: Flatten directory - name: Flatten directory