如何在Github Actions中设置秘密? [英] How to set secrets in Github Actions?
本文介绍了如何在Github Actions中设置秘密?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
官方样板代码按如下方式注入npm令牌
The official boilerplate code injects the npm token as follows
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
如何访问和设置此变量?我无法在GUI中找到它.
How do I access and set this variable? I cant find it in the GUI.
推荐答案
- 转到Github中的项目
- 选择
Settings
标签 - 点击左侧菜单中的
Secrets
部分 -
Add a new secret
并提供名称(例如npm_token
)和值.
- Go to your project in Github
- Select the
Settings
tab - Click the
Secrets
section in the left hand menu Add a new secret
and provide a name (e.g.npm_token
) and a value.
这篇关于如何在Github Actions中设置秘密?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文