Skip to content

Commit 1e02bd5

Browse files
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 #98 --------- Co-authored-by: Parker Brown <17183625+parkerbxyz@users.noreply.github.com>
1 parent 5195df7 commit 1e02bd5

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

README.md

+23
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,29 @@ jobs:
179179

180180
```yaml
181181
on: [push]
182+
183+
jobs:
184+
create_issue:
185+
runs-on: self-hosted
186+
187+
steps:
188+
- name: Create GitHub App token
189+
id: create_token
190+
uses: actions/create-github-app-token@v1
191+
with:
192+
app-id: ${{ vars.GHES_APP_ID }}
193+
private-key: ${{ secrets.GHES_APP_PRIVATE_KEY }}
194+
owner: ${{ vars.GHES_INSTALLATION_ORG }}
195+
github-api-url: ${{ vars.GITHUB_API_URL }}
196+
197+
- name: Create issue
198+
uses: octokit/request-action@v2.x
199+
with:
200+
route: POST /repos/${{ github.repository }}/issues
201+
title: "New issue from workflow"
202+
body: "This is a new issue created from a GitHub Action workflow."
203+
env:
204+
GITHUB_TOKEN: ${{ steps.create_token.outputs.token }}
182205
```
183206

184207
## Inputs

0 commit comments

Comments
 (0)