All Projects → bobheadxi → Deployments

bobheadxi / Deployments

Licence: mit
❗️GitHub Action for working painlessly with deployment statuses

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to Deployments

Github Rest Apis For Insomnia
💯 A complete set of GitHub REST API route specifications that can be imported straight into Insomnia REST Client
Stars: ✭ 90 (-21.74%)
Mutual labels:  github-api
Lastversion
Find the latest release version of an arbitrary project
Stars: ✭ 103 (-10.43%)
Mutual labels:  github-api
Repostatus.org
A standard to easily communicate to humans and machines the development/support and usability status of software repositories/projects.
Stars: ✭ 111 (-3.48%)
Mutual labels:  status
Dart hub
A GitHub client written in Flutter.
Stars: ✭ 91 (-20.87%)
Mutual labels:  github-api
Opensource
Conheça os projetos Open Source na Globo.com
Stars: ✭ 100 (-13.04%)
Mutual labels:  github-api
Llum
Llum (light in catalan language) illuminates your Laravel projects speeding up your Github/Laravel development workflow
Stars: ✭ 107 (-6.96%)
Mutual labels:  github-api
Repopeek
RepoPeek is a python script to get details about a repository without cloning it.
Stars: ✭ 85 (-26.09%)
Mutual labels:  github-api
Github ecto
Ecto adapter for GitHub API
Stars: ✭ 114 (-0.87%)
Mutual labels:  github-api
Vblog
使用GitHub API 搭建一个可动态发布文章的博客
Stars: ✭ 1,375 (+1095.65%)
Mutual labels:  github-api
Mcstatus
💡 Minecraft services status checker
Stars: ✭ 111 (-3.48%)
Mutual labels:  status
Discord Rich Presence Tool
A C++/Qt program that lets you fill in your own custom Discord Rich Presence information for games and activities away from the PC.
Stars: ✭ 91 (-20.87%)
Mutual labels:  status
Immersionbar
android 4.4以上沉浸式状态栏和沉浸式导航栏管理,适配横竖屏切换、刘海屏、软键盘弹出等问题,可以修改状态栏字体颜色和导航栏图标颜色,以及不可修改字体颜色手机的适配,适用于Activity、Fragment、DialogFragment、Dialog,PopupWindow,一句代码轻松实现,以及对bar的其他设置,详见README。简书请参考:http://www.jianshu.com/p/2a884e211a62
Stars: ✭ 10,030 (+8621.74%)
Mutual labels:  status
Year On Github
🐙 Share your Github stats for 2020 on Twitter
Stars: ✭ 108 (-6.09%)
Mutual labels:  github-api
Gistr
Interact with GitHub gists from R
Stars: ✭ 90 (-21.74%)
Mutual labels:  github-api
Flutter Status Alert
Display Apple system-like self-hiding status alerts. It is well suited for notifying user without interrupting user flow.
Stars: ✭ 111 (-3.48%)
Mutual labels:  status
Github Clone
⬇️ ⠀git clone repo subdirectories
Stars: ✭ 87 (-24.35%)
Mutual labels:  github-api
Inferno
🔥 Modern command line tool for malware creation on Windows
Stars: ✭ 105 (-8.7%)
Mutual labels:  status
Android Issue Reporter
A powerful and simple library to open issues on GitHub directly from your app.
Stars: ✭ 115 (+0%)
Mutual labels:  github-api
Gitstats
An open source github contribution analyzer
Stars: ✭ 115 (+0%)
Mutual labels:  github-api
Rxgithub
An example of MVVM using RxSwift and Swinject (DI)
Stars: ✭ 109 (-5.22%)
Mutual labels:  github-api

GitHub Deployments View Action

bobheadxi/deployments is a GitHub Action for working painlessly with deployment statuses. Instead of exposing convoluted Action configuration that mirrors that of the GitHub API like some of the other available Actions do, this Action simply exposes a number of configurable, easy-to-use "steps" common to most deployment flows.

A simple example:

on:
  push:
    branches:
    - master

jobs:
  deploy:
    steps:
    - name: start deployment
      uses: bobheadxi/[email protected]
      id: deployment
      with:
        step: start
        token: ${{ secrets.GITHUB_TOKEN }}
        env: release

    - name: do my deploy
      # ...

    - name: update deployment status
      uses: bobheadxi/[email protected]
      if: always()
      with:
        step: finish
        token: ${{ secrets.GITHUB_TOKEN }}
        status: ${{ job.status }}
        deployment_id: ${{ steps.deployment.outputs.deployment_id }}

See this blog post for a bit of background and more practical example. Other usage examples in the wild:

Features

step: start

This is best used on the push: { branches: [ ... ] } event, but you can also have release: { types: [ published ] } trigger this event. start should be followed by whatever deployment tasks you want to do, and it creates and marks a deployment as "started":

deploy started

The following inputs are available:

Variable Default Purpose
step must be start for this step
token provide your ${{ secrets.GITHUB_TOKEN }} for API access
logs URL to GitHub commit checks URL of your deployment logs
desc description for this deployment
env identifier for environment to deploy to (e.g. staging, prod, master)
no_override true toggle whether to mark existing deployments of this environment as inactive
deployment_id Use an existing deployment instead of creating a new one (e.g. ${{ github.event.deployment.id }})
ref github.ref Specify a particular git ref to use, (e.g. ${{ github.head_ref }})

The following outputs are available:

Variable Purpose
deployment_id ID of created GitHub deployment
env name of configured environment
Simple Push Example

on:
  push:
    branches:
    - master

jobs:
  deploy:
    steps:
    - name: start deployment
      uses: bobheadxi/[email protected]
      id: deployment
      with:
        step: start
        token: ${{ secrets.GITHUB_TOKEN }}
        env: release

    - name: do my deploy
      # ...

Simple Pull Request Example

on:
  pull_request:

jobs:
  deploy:
    steps:
    - name: start deployment
      uses: bobheadxi/[email protected]
      id: deployment
      with:
        step: start
        token: ${{ secrets.GITHUB_TOKEN }}
        env: integration
        ref: ${{ github.head_ref }}

    - name: do my deploy
      # ...

step: finish

This is best used after step: start and should follow whatever deployment tasks you want to do in the same workflow. finish marks an in-progress deployment as complete:

deploy finished

The following inputs are available:

Variable Default Purpose
step must be finish for this step
token provide your ${{ secrets.GITHUB_TOKEN }} for API access
logs URL to GitHub commit checks URL of your deployment logs
desc description for this deployment
status provide the current deployment job status ${{ job.status }}
deployment_id identifier for deployment to update (see outputs of step: start)
env_url URL to view deployed environment
Simple Example

# ...

jobs:
  deploy:
    steps:
    - name: start deployment
      # ... see previous example

    - name: do my deploy
      # ...

    - name: update deployment status
      uses: bobheadxi/[email protected]
      if: always()
      with:
        step: finish
        token: ${{ secrets.GITHUB_TOKEN }}
        status: ${{ job.status }}
        deployment_id: ${{ steps.deployment.outputs.deployment_id }}

step: deactivate-env

This is best used on the pull_request: { types: [ closed ] } event, since GitHub does not seem to provide a event to detect when branches are deleted. This step can be used to automatically shut down deployments you create on pull requests and mark environments as destroyed:

env destroyed

The following inputs are available:

Variable Default Purpose
step must be deactivate-env for this step
token provide your ${{ secrets.GITHUB_TOKEN }} for API access
logs URL to GitHub commit checks URL of your deployment logs
desc description for this deployment
env identifier for environment to deploy to (e.g. staging, prod, master)
Simple Example

on:
  pull_request:
    types: [ closed ]

jobs:
  prune:
    steps:
    # see https://dev.to/bobheadxi/branch-previews-with-google-app-engine-and-github-actions-3pco
    - name: extract branch name
      id: get_branch
      shell: bash
      env:
        PR_HEAD: ${{ github.head_ref }}
      run: echo "##[set-output name=branch;]$(echo ${PR_HEAD#refs/heads/} | tr / -)"

    - name: do my deployment shutdown
      # ...

    - name: mark environment as deactivated
      uses: bobheadxi/[email protected]
      with:
        step: deactivate-env
        token: ${{ secrets.GITHUB_TOKEN }}
        env: ${{ steps.get_branch.outputs.branch }}
        desc: Deployment was pruned

Debugging

The argument log_args: true can be provided to print arguments used by deployments.


Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].