道招

githubaction提示The `set-output` command is deprecated and will be disabled soon怎么解决

如果您发现本文排版有问题,可以先点击下面的链接切换至老版进行查看!!!

githubaction提示The `set-output` command is deprecated and will be disabled soon怎么解决

这是github官方的改动,github actions不再推荐使用过时的写法

  • 过时的写法
- name: Save state
run: echo "::save-state name={name}::{value}"

- name: Set output
run: echo "::set-output name={name}::{value}"
  • 而是应该用最新的写法
- name: Save state
run: echo "{name}={value}" >> $GITHUB_STATE

- name: Set output
run: echo "{name}={value}" >> $GITHUB_OUTPUT

如果是间接使用导致出现这样的警告,一般就是自己用到的actions里面有使用到过时的写法,比如actions/setup-python@v4或者actions/setup-node@v4

更新时间:
上一篇:下一篇:

相关文章

关注道招网公众帐号
友情链接
消息推送
道招网关注互联网,分享IT资讯,前沿科技、编程技术,是否允许文章更新后推送通知消息。
允许
不用了