如何在Github Actions中设置秘密? [英] How to set secrets in Github Actions?

查看:119
本文介绍了如何在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.

推荐答案

  1. 转到Github中的项目
  2. 选择Settings标签
  3. 点击左侧菜单中的Secrets部分
  4. Add a new secret并提供名称(例如npm_token)和值.
  1. Go to your project in Github
  2. Select the Settings tab
  3. Click the Secrets section in the left hand menu
  4. Add a new secret and provide a name (e.g. npm_token) and a value.

这篇关于如何在Github Actions中设置秘密?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆