Skip to main content

GitHub Action: seek-deployment

Get GitHub deployment object by ref and environment name

Usage

  name: github-action-seek-deployment
on:
pull_request:
branches: [ 'main' ]
types: [opened, synchronize, reopened, closed, labeled, unlabeled]

jobs:
context:
runs-on: ubuntu-latest
steps:
- name: github-action-seek-deployment
uses: cloudposse/github-action-seek-deployment@main
id: deployment
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
environment: dev
ref: ${{ github.event.pull_request.head.ref }}
status: success

outputs:
id: "${{ steps.deployment.outputs.id }}"

Inputs

NameDescriptionDefaultRequired
environmentEnvironment nameN/Atrue
github-tokenThe GitHub token${{ github.token }}true
refBranch or commit SHAN/Atrue
statusDeployment statusN/Afalse

Outputs

NameDescription
idDeployment ID