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

pkg-src/github-action-git-bash: GitHub Action to run a command or script in a Gi ...

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

开源软件名称:

pkg-src/github-action-git-bash

开源软件地址:

https://github.com/pkg-src/github-action-git-bash

开源编程语言:

Shell 69.3%

开源软件介绍:

github-action-git-bash

GitHub Action to run a command or script in a Git-ready environment. Possible use cases include push mirroring, committing and pushing changes, merging branches, or creating tags from a CI pipeline.

Secrets

  • GITHUB_TOKENOptional. If set, the action will set Git's user.name and user.email options to the actors name and email. This is useful when creating commits.
  • SSH_KEYOptional. If set, the action will start an SSH agent and insert the key. This is useful for authenticating with remote repositories (e.g. for push mirroring). The secret must contain an unencrypted private key without trailing line feed.

Variables

  • SSH_KEY_VAROptional. Name of the SSH_KEY secret. This can be useful if the action is used multiple times in a workflow.

Usage example

workflow "On push" {
  on = "push"
  resolves = ["Update mirror"]
}

action "Update mirror" {
  uses = "fnkr/github-action-git-bash@v1"
  secrets = ["GITHUB_TOKEN", "SSH_KEY"]
  args = ["bash", "-c", "{ [ \"$(git rev-parse --abbrev-ref HEAD)\" = \"master\" ] || exit 78; } && rm -rf .github && git add -A .github && git commit -m \"Remove .github\" && git remote set-url origin [email protected]:GITHUB/PROJECT.git && git push --force origin master"]
}



鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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