当前位置: 首页 > news >正文

做聊天室cpa用什么类型的网站好网络营销推广手段

做聊天室cpa用什么类型的网站好,网络营销推广手段,做婚礼效果图的网站有哪些,网站如何做优化Github Action Bot 开发教程 在使用 Github 时#xff0c;你可能在一些著名的开源项目#xff0c;例如 Kubernetes#xff0c;Istio 中看到如下的一些评论#xff1a; /lgtm /retest /area bug /assign xxxx ...等等#xff0c;诸如此类的一些功能性评论。在这些评论出现…Github Action Bot 开发教程 在使用 Github 时你可能在一些著名的开源项目例如 KubernetesIstio 中看到如下的一些评论 /lgtm /retest /area bug /assign xxxx ...等等诸如此类的一些功能性评论。在这些评论出现时往往会出现一个 Github-bot 给问题添加一些 label将 issue 分配给指定的人等等。类似注入此类的动作都是通过 Github Action 完成的。在本篇文章中我们将介绍如何开发一个 Github Action Bot。 功能调研 要实现的 Action 动作为在 PR 下面评论 /retest 触发 action自动收集运行失败的工作流 job并重新运行。我们借鉴已有的 Action https://github.com/envoyproxy/toolshed/tree/main/gh-actions/retest envoy 的实现是通过 ts 结合 Github 的 Rest API 完成 https://docs.github.com/en/rest/pages/pages?apiVersion2022-11-28 实现 本项目使用 Go 语言编写通过 Github API Golang 实现和 Github 交互编写完成之后发布到 Github Action Marketplace。 https://github.com/actions-go/toolkithttps://github.com/google/go-github 大致思路 根据传入的 pr url获取 pr 的信息之后根据 comment id 获取 comment 内容判断是否为 /retest 是则收集失败的 job再次运行判断 job rerun 是否成功成功给 comment 加入 响应。注意这里的成功是指创建 rerun-job 成功不是指 job 本身成功运行结束。 代码目录结构 │ .gitignore │ action.yml # action.yml 配置 │ Dockerfile # 项目运行需要的 Dockerfile │ go.mod │ go.sum │ LICENSE │ main.go # 入口 main.go 文件 │ README.md │ ├─.github │ └─workflows │ build-and-test.yml │ retest.yml └─retest # retest 逻辑实现retest.goretest_test.gotypes.goGithub Action 配置 创建 action.yml 配置文件 name: Github Pull Request Retest description: Re-run failed GitHub Workflow runs on PRs by commenting /retest. author: yuluo branding:color: blueicon: activity inputs:token:description: GitHub token used to create and remove comments. By default, this uses therepository token provided by GitHub Actions. You can customize the user byreplacing this token with a user token which has write-access to yourrepository. Note that the token will be accessible to all repositorycollaborators.default: ${{ github.token }}comment-id:description: -ID of comment for responserequired: truetype: numberpr-url:description: -URL to fetch PR informationrequired: trueruns:using: dockerimage: Dockerfileargs:- ${{ inputs.token }}- ${{ inputs.comment-id }}- ${{ inputs.pr-url }}- ${{ inputs.args }}此配置文件中主要参数如下文档 https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions 作者名字描述等式必须的。inputs 参数描述如下 inputs: # 参数的字典milliseconds: # change this # 参数名,required: true # 是否是必填description: input description here # 参数的说明default: default value if applicable # 默认值注意inputs 参数是需要在 .github/workflows/action-ci.yml 中配置的输入参数如果不配置获取到的输入是空值 runs 参数 runs:# 运行 action 的方式envoy 通过 nodejs 运行using: docker# 在项目中需要编写 Dockerfile作为镜像入口envoy 使用 ts 编写所以入口为 main: index.jsimage: Dockerfile# 运行时输入到 Docker container 内部的参数。args:- ${{ inputs.token }}- ${{ inputs.comment-id }}- ${{ inputs.pr-url }}- ${{ inputs.args }}本次编写中主要用到的配置项为以上两个更多的参数可以参考文档。 发布 Github Action Marketplacehttps://github.com/marketplace/new 项目在编写完成之后建立一个 github repo将代码上传到仓库之后点击上述地址就会出现 actions 选择。发布需要创建版本根据要求创建一个对应版本即可。在发布时会检测 action.yml 配置在合法之后才会允许发布。 发布成功如下 https://github.com/marketplace/actions/github-pull-request-retest 使用 之后在任意仓库的 .github/workflows/command.yml 中配置如下内容即可使用 name: Retest Action on PR Commenton:issue_comment:types: [created]permissions:contents: readjobs:retest:name: Retestruns-on: ubuntu-22.04permissions:pull-requests: writeactions: writesteps:- uses: yuluo-yx/gh-retestv1.0.0-RC1with:token: ${{ secrets.GITHUB_TOKEN }}comment-id: ${{ github.event.comment.id }}pr-url: ${{ github.event.issue.pull_request.url }}在此仓库对应的 pr 下面输入 /retest 观察仓库 Action 即可看到 job 自动 rerun。 项目地址https://github.com/yuluo-yx/gh-retest.git欢迎 star。
http://www.hkea.cn/news/14372206/

相关文章:

  • 青岛做网站找哪家好买的网站模板怎么上传
  • 如何做兼职网站平台公司网站没备案
  • 如何做网站海报注册网站域名要钱吗
  • 系部 网站建设方案搜索引擎网站优化和推广方案
  • 如何做网站流量分析报表沈阳人流需要多少钱大概多少钱
  • 建设网站的命令wordpress编辑器缓慢
  • 昆明建设厅官方网站建设网站前的市场分析包括
  • php网站后台wordpress首页文章摘要
  • 哪些网站做家政推广推广平台网站有哪些
  • 网站怎么创建网页设计需要什么技术
  • 海外贸易网站广东省城乡建设厅网站首页
  • 建设银行网站logo网站开发文本
  • 厦门英文网站建设网站字体大小是多少合适
  • 网页设计与制作精品课程网站文章网站模板
  • 苏州城乡建设局网站质检员沈阳高端网站设计
  • 望京做网站视频制作公司排行
  • 做网站用框架么商城网站营销系统源码
  • 上海高品质网站建设360建筑网怎么删除简历
  • 网站ico如何修改网站如何在360做提交
  • 专业的网站建设与优化综合类门户网站有哪些
  • 南昌县建设局网站浙江住房城乡建设厅网站首页
  • 网站建设引流刘贺稳1展览展示设计网站
  • 提供深圳网站制作公司秦皇岛最新封闭通知
  • 台州网站建设公司.世界500强互联网公司排名
  • 上海城乡建设部网站上海相亲网
  • 如何购买网站服务器下载站源码cms
  • 建设银行 北京招聘网站网站设计 品牌设计
  • 网站开发与应用是什么网站用什么域名
  • 中国石油网站建设在线第三次作业做代理需要交钱吗
  • 网站搭建平台流程网络服务商名称