Giter VIP home page Giter VIP logo

deployment-status's Introduction

deployment-status

A GitHub action to update the status of Deployments as part of your GitHub CI workflows.

Works great with my other action to create Deployments, mdouglass/deployment-action.

Action inputs

name description
state The state to set the deployment to. Must be one of the below: "error" "failure" "inactive" "in_progress" "queued" "pending" "success"
token GitHub token
log-url (Optional) The log URL. This should be the URL of the deployment status event
description (Optional) Descriptive message about the deployment
environment-url (Optional) Sets the URL for accessing your environment
deployment-id The ID of the deployment to update

Usage example

The below example includes mdouglass/deployment-action and mdouglass/deployment-status to create and update a deployment within a workflow.

name: Deploy

on: [push]

jobs:
  deploy:
    name: Deploy my app

    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v1

      - uses: mdouglass/deployment-action@releases/v1
        name: Create GitHub deployment
        id: deployment
        with:
          token: "${{ github.token }}"
          environment-url: http://my-app-url.com
          environment: production

      - name: Deploy my app
        run: |
          # add your deployment code here

      - name: Update deployment status (success)
        if: success()
        uses: mdouglass/deployment-status@releases/v1
        with:
          token: "${{ github.token }}"
          environment-url: http://my-app-url.com
          state: "success"
          deployment-id: ${{ steps.deployment.outputs.deployment-id }}

      - name: Update deployment status (failure)
        if: failure()
        uses: mdouglass/deployment-status@releases/v1
        with:
          token: "${{ github.token }}"
          environment-url: http://my-app-url.com
          state: "failure"
          deployment-id: ${{ steps.deployment.outputs.deployment-id }}

Development

Install dependencies with npm install.

Building

Build everything with npm run all.

Testing

There is a validation workflow in .github/workflows/validate.yml which performs a basic smoke test against the action to check that it runs.

deployment-status's People

Contributors

aarontwf avatar chrnorm avatar dependabot[bot] avatar localheinz avatar maxcountryman avatar mdouglass avatar sergeysova avatar shunkakinoki avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.