Files
doc/gitea_action模板常见默认变量.md
2025-10-24 09:18:52 +08:00

19 lines
713 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# gitea_action模板常见默认变量
先说一下自定义的变量:
secret会被加载到secrets的空间下${secrets.~} 注意不要漏了s
value会被加载到vars的空间下${vars.~}
有相当一部分变量是github的这并不全是继承而是兼容
意思就是只有github.~,并没有映射到gitea.~
#### 以下变量可以直接用
**github.sha/GITHUB_SHA** 当此提交的sha值 $GITHUB_SHA ${{github.sha}}
**github.repository/GITHUB_REPOSITORY** 当前所有者的仓库名,格式:用户/仓库名 $GITHUB_REPOSITORY ${{github.repository}}
**GITHUB_REF_NAME** 标签名:当工作流触发机制与标签相关才有 $GITHUB_REF_NAME (只能直接用在run字段下)