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

unacast/actions-github-deployment-status: This is a Github Action that makes you ...

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

开源软件名称:

unacast/actions-github-deployment-status

开源软件地址:

https://github.com/unacast/actions-github-deployment-status

开源编程语言:

Shell 97.9%

开源软件介绍:

github-deployment-status

This Github actions adds functions for creating a status on the github deployment api.

It is a small wrapper for your workflows to use the Github Deployment Status API https://docs.github.com/en/rest/reference/repos#deployments

Read more on the deployment event on github actions https://docs.github.com/en/actions/reference/events-that-trigger-workflows#deployment

Usage

For example like this

on: deployment
name: Deploy
jobs:
  deploy:
    name: Deploy event
    runs-on: ubuntu-latest
    steps:
      - name: Set deploystatus in_progress
        uses: unacast/actions-github-deployment-status@[version]
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}
          status: in_progress

... <Do your deploy stuff>
      - name: Set an environment
        run: |
          echo 'DEPLOY_ENVIRONMENT=http://halloi.lol' >> $GITHUB_ENV

      - name: Update result to Deployment API
        if: always()
        uses: unacast/actions-github-deployment-status@[version]
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}
          status: ${{ job.status }}
          description: "Deployed to some magic"
          environment_url: '${{ env.DEPLOY_ENVIRONMENT }}'

Inputs

The action has the following inputs (see in action.yml)

  github_token:
    description: 'The GITHUB_TOKEN secret'
    required: true
  status:
    description: 'The status to create. Can be one of error, failure, inactive, in_progress, queued, pending, or success'
    required: true
  description:
    description: 'The description to create. Restricted to 140 chars'
    required: false
    default: ""
  environment_url:
    description: 'Sets the URL for accessing your environment'
    required: false
    default: ""
  auto_inactive:
    description: "Adds a new inactive status to all prior non-transient, non-production environment deployments with the same repository and environment name as the created status's deployment. An inactive status is only added to deployments that had a success state."
    required: false
    default: true    

FAQ

Q: Can I use this in workflows that listens to events other than the deployment event? A: No. This is tailored to the deployment event.




鲜花

握手

雷人

路过

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

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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