A simple GitHub Action that creates, updates, comments on, or closes issues using the GitHub CLI (gh).
Ideal for CI/CD workflows that need to:
- Automatically open or update tracking issues
- Comment on existing issues from automation
- Close issues after builds or deployments are complete
- Create new issues with titles, bodies, templates, labels, and assignees
- Update existing issues automatically
- Add comments to existing issues
- Close issues by title and label search
- Uses
ghCLI under the hood (no extra dependencies)
| Name | Description | Default | Required |
|---|---|---|---|
token | GitHub token (or PAT) used for authentication | ${{github.token}} | Yes |
mode | Operation mode: create or close | create | Yes |
state | Issue state filter when searching for existing issues: open, closed, or all | open | Yes |
title | Title of the issue to create or update | - | Yes |
labels | Comma-separated list of labels used for creation and search | - | No |
assignees | Comma-separated list of users to assign the issue to | - | No |
body | Optional body text for the issue | - | No |
comment | Optional comment text to add to an existing issue instead of updating the issue body, or as closing comment if closing the issue | - | No |
repo | Repository to operate on (owner/repo) | ${{github.repository}} | Yes |
name: Reporting on failed buildson:
push:
branches:
- mainjobs:
build:
runs-on: ubuntu-lateststeps:
- name: Checkoutuses: actions/checkout@v4
- name: Buildrun: make buildreport-failure:
runs-on: ubuntu-latestneeds: buildif: failure()permissions:
contents: readissues: writesteps:
- name: Report build failureuses: CodeReaper/create-issue-action@v1with:
title: "{{ github.workflow }} failed to build"labels: automationassignees: "@me"body: See [the action log](https://github.com/{{ github.repository }}/actions/runs/{{ github.run_id }}) for more details.This project is released under the MIT License