• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

gliech/create-github-secret-action: Github Action that can create or update secr ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

gliech/create-github-secret-action

开源软件地址:

https://github.com/gliech/create-github-secret-action

开源编程语言:

JavaScript 100.0%

开源软件介绍:

Create GitHub Secret Action

release

This action can create or update secrets in the GitHub Actions API. It supports both repository and organization secrets in a unified input syntax.

Usage

Basic example (creates a secret in the repository where the workflow file is located):

steps:
  - uses: gliech/create-github-secret-action@v1
    with:
      name: FRONT_DOOR_PASSWORD
      value: Eternia
      pa_token: ${{ secrets.PA_TOKEN }}

Create a secret in a different repository:

steps:
  - uses: gliech/create-github-secret-action@v1
    with:
      location: horde-prime/spire-network
      name: BROADCAST_FREQUENCY
      value: ${{ secrets.JAMMING_FREQUENCY }}
      pa_token: ${{ secrets.PAT_WRONG_HORDAK }}

Create a secret in an organization:

steps:
  - uses: gliech/create-github-secret-action@v1
    with:
      location: united-states-air-force
      name: NUCLEAR_LAUNCH_CODES
      value: '00000000'
      org_visibility: all
      pa_token: ${{ secrets.PAT_STRATEGIC_AIR_COMMAND }}

Inputs

name

(Required) Name of the secret that you want to create/update.

value

(Required) Value of the secret that you want to create/update.

This action cannot mask the provided secret value in workflow logs. If you do not want the secret value to appear in the output of your workflow run, you have to mask it before you provide it to this action as input.

location

Name of a GitHub repository or organization where you want to create/update a secret. Expects the notation owner/repo for repositories. Defaults to the repository that invoked the workflow.

pa_token

(Required) Personal access token with permission to modify repository or organization secrets.

For more information on PATs see the GitHub docs article on creating a personal access token. The GitHub Secrets API requires the repo scope to modify secrets in private repositories and the public_repo scope for public repositories. It requires admin:org scope to modify secrets in an organization.

org_visibility

Only used for organization secrets. Can be set to one of 3 values:

  • all will make the secret visible to all repositories in the organization
  • private makes it visible only to repositories that are not public
  • any other input value will be interpreted as a list of comma-seperated GitHub repository IDs, which will cause the created secret to be selectively visible only from these repositories

Defaults to private.

GitHub repository IDs are not repository URLs or names. They are a number used to identify repositories on GitHub specifically. For more information see the GitHub API documentation on repositories or this question on Stack Overflow.

Outputs

status

HTTP Status Code of the request against the GitHub API that created/updated the secret.

License

This project is licensed under the terms of the MIT License




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
IonicaBizau/gh.js: Tiny GitHub API wrapper for server and client.发布时间:2022-06-13
下一篇:
wobsoriano/coderstats: 发布时间:2022-06-13
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap