Compare commits

...
3 Commits
3 changed files with 10 additions and 26 deletions

No files matched your search

+1
View File
@@ -0,0 +1 @@
* @gr2m @parkerbxyz @actions/github-app-token-maintainers
+6 -5
View File
@@ -1,21 +1,22 @@
name: test
on: [push]
jobs:
demo:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '16.16'
cache: 'npm'
node-version: "16.16"
cache: "npm"
- run: npm ci
- run: npm run build
- uses: ./ # Uses the action in the root directory
id: demo
with:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.PRIVATE_KEY }}
app_id: ${{ vars.TEST_APP_ID }}
private_key: ${{ secrets.TEST_APP_PRIVATE_KEY }}
- uses: octokit/request-action@v2.x
id: get-repository
env:
+3 -21
View File
@@ -1,4 +1,4 @@
# `gr2m/github-app-token-action`
# `actions/github-app-token`
> GitHub Action for creating a GitHub App Installation Access Token
@@ -19,7 +19,7 @@ jobs:
hello-world:
runs-on: ubuntu-latest
steps:
- uses: gr2m/github-app-token-action@v1
- uses: actions/github-app-token@v1
id: app-token
with:
app_id: ${{ vars.APP_ID }}
@@ -31,24 +31,6 @@ jobs:
body: "Hello, World!"
```
### Limit the app's permissions and access to repositories
```yaml
on: [issues]
jobs:
with-scoped-token:
runs-on: ubuntu-latest
steps:
- uses: gr2m/github-app-token-action@v1
id: app-token
with:
# required
app_id: ${{ vars.APP_ID }}
private_key: ${{ secrets.PRIVATE_KEY }}
# do something with the token
```
### Use app token with `actions/checkout`
```yaml
@@ -58,7 +40,7 @@ jobs:
auto-format:
runs-on: ubuntu-latest
steps:
- uses: gr2m/github-app-token-action@v1
- uses: actions/github-app-token@v1
id: app-token
with:
# required