docs(README): add GHES workflow example (#104)
This pull request includes a significant change to the `README.md` file. The change adds a new job to the GitHub Actions workflow, which is designed to create an example of how to use `create-github-app-token` action on GitHub Enterprise Server. Resolves https://github.com/actions/create-github-app-token/issues/98 --------- Co-authored-by: Parker Brown <17183625+parkerbxyz@users.noreply.github.com>
This commit is contained in:
@@ -179,6 +179,29 @@ jobs:
|
||||
|
||||
```yaml
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
create_issue:
|
||||
runs-on: self-hosted
|
||||
|
||||
steps:
|
||||
- name: Create GitHub App token
|
||||
id: create_token
|
||||
uses: actions/create-github-app-token@v1
|
||||
with:
|
||||
app-id: ${{ vars.GHES_APP_ID }}
|
||||
private-key: ${{ secrets.GHES_APP_PRIVATE_KEY }}
|
||||
owner: ${{ vars.GHES_INSTALLATION_ORG }}
|
||||
github-api-url: ${{ vars.GITHUB_API_URL }}
|
||||
|
||||
- name: Create issue
|
||||
uses: octokit/request-action@v2.x
|
||||
with:
|
||||
route: POST /repos/${{ github.repository }}/issues
|
||||
title: "New issue from workflow"
|
||||
body: "This is a new issue created from a GitHub Action workflow."
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ steps.create_token.outputs.token }}
|
||||
```
|
||||
|
||||
## Inputs
|
||||
|
||||
Reference in New Issue
Block a user