Skip to content

About

GitHub action for updating deployments with status events.

Topics

Resources

Stars

26 stars

Watchers

2 watching

Forks

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Latest commit

 

History

24 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Status Action

Marks a deployment status for GitHub actions. Run it from a workflow triggered by the deployment event, or pass deployment-id.

Parameters

Inputs

  • state: Deployment state. (default: pending)
  • description: Descriptive message about the deployment state.
  • log-url: Log url location.
  • token: GitHub token with deployments: write permission. (default: ${{ github.token }})
  • environment: Name for the target deployment environment, which can be changed when setting a deploy status.
  • environment-url: URL for accessing your environment.
  • deployment-id: ID of the deployment to update. (default: the deployment that triggered the workflow)

Example

# .github/workflows/deploy.yml
name: Deploy

on: ["deployment"]

jobs:
  deployment:
    runs-on: "ubuntu-latest"
    permissions:
      deployments: write

    steps:
      - uses: actions/checkout@v7

      - name: "deployment pending"
        uses: "deliverybot/deployment-status@v2"
        with:
          state: "pending"
          token: "${{ github.token }}"

      - name: "deploy"
        run: |
          npm run deploy

      - name: "deployment success"
        if: success()
        uses: "deliverybot/deployment-status@v2"
        with:
          state: "success"
          token: "${{ github.token }}"

      - name: "deployment failure"
        if: failure()
        uses: "deliverybot/deployment-status@v2"
        with:
          state: "failure"
          token: "${{ github.token }}"

Requirements

This is a composite action that calls the GitHub API with the GitHub CLI (gh). GitHub-hosted runners include it. On self-hosted runners or in jobs that run inside a container:, make sure gh is installed.

Development

The action is action.yml plus status.sh. Run the tests with:

shellcheck status.sh test/*.sh
test/status.test.sh

CI also runs the action against the real API by creating and then deleting a test deployment.

About

GitHub action for updating deployments with status events.

Topics

Resources

Stars

26 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages