GitHub Action to create an Issue on a GitHub Repository. This action can be used to create an issue when a build fails in a GitHub Action workflow.
This action can be used after any other action. Below is simple example on using it:
1. Create a .github/workflows/github-issue-creation.yml
2. Add the following properties to github-issue-creation.yml
file
on: push
name: GitHub Issue Creation Demo
jobs:
githubIssueCreation:
name: GitHub Creation Demo
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: GitHub Issue Creation Demo
uses: senzing-factory/github-action-github-issue-creation@1.0.0
env:
GITHUB_ISSUE_BODY: Demo'ing GitHub Issue Creation
GITHUB_ISSUE_TITLE: Demo'ing GitHub Issue Creation
GITHUB_REPO_NAME: github-action-github-issue-creation
GITHUB_REPO_OWNER: senzing-factory
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_SHA: ${{ github.sha }}
Go here for a template yml with all environment variables.
These are the environment variables that can be set to pass in additional information about the Git Action.
Variable Name | Required | Description |
---|---|---|
GITHUB_ISSUE_BODY | Yes | Body of the issue to be created. |
GITHUB_ISSUE_TITLE | Yes | Title of the issue to be created. |
GITHUB_OWNER | Yes | The owner of the repository which is normally seen in the URI as a prefix to the repository. |
GITHUB_REPOSITORY | Yes | The name of the repository. |
GITHUB_TOKEN | Yes | The GitHub access token used by Git Actions workflow. Can use the native token generated by Git Actions or create a custom secret. |
GITHUB_COMMIT_SHA | Yes | The commit SHA associated to running the Git Action workflow. |
- Using environment variables lists the default environment variables set in Git Actions.
- Authenticating with the GITHUB_TOKEN