Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c04bb41e61 | ||
|
|
75a13e1cc6 | ||
|
|
d1dfb47fa4 | ||
|
|
847634eeb3 | ||
|
|
c08b7942e4 |
1
.github/CODEOWNERS
vendored
Normal file
1
.github/CODEOWNERS
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
* @gr2m @parkerbxyz @actions/github-app-token-maintainers
|
||||||
11
.github/workflows/test.yml
vendored
11
.github/workflows/test.yml
vendored
@@ -1,21 +1,22 @@
|
|||||||
|
name: test
|
||||||
on: [push]
|
on: [push]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
demo:
|
test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- uses: actions/setup-node@v3
|
- uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: '16.16'
|
node-version: "16.16"
|
||||||
cache: 'npm'
|
cache: "npm"
|
||||||
- run: npm ci
|
- run: npm ci
|
||||||
- run: npm run build
|
- run: npm run build
|
||||||
- uses: ./ # Uses the action in the root directory
|
- uses: ./ # Uses the action in the root directory
|
||||||
id: demo
|
id: demo
|
||||||
with:
|
with:
|
||||||
app_id: ${{ secrets.APP_ID }}
|
app_id: ${{ vars.TEST_APP_ID }}
|
||||||
private_key: ${{ secrets.PRIVATE_KEY }}
|
private_key: ${{ secrets.TEST_APP_PRIVATE_KEY }}
|
||||||
- uses: octokit/request-action@v2.x
|
- uses: octokit/request-action@v2.x
|
||||||
id: get-repository
|
id: get-repository
|
||||||
env:
|
env:
|
||||||
|
|||||||
24
README.md
24
README.md
@@ -1,4 +1,4 @@
|
|||||||
# `app-token-action`
|
# `actions/github-app-token`
|
||||||
|
|
||||||
> GitHub Action for creating a GitHub App Installation Access Token
|
> GitHub Action for creating a GitHub App Installation Access Token
|
||||||
|
|
||||||
@@ -19,7 +19,7 @@ jobs:
|
|||||||
hello-world:
|
hello-world:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: gr2m/app-token-action@v1
|
- uses: actions/github-app-token@v1
|
||||||
id: app-token
|
id: app-token
|
||||||
with:
|
with:
|
||||||
app_id: ${{ vars.APP_ID }}
|
app_id: ${{ vars.APP_ID }}
|
||||||
@@ -31,24 +31,6 @@ jobs:
|
|||||||
body: "Hello, World!"
|
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/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`
|
### Use app token with `actions/checkout`
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
@@ -58,7 +40,7 @@ jobs:
|
|||||||
auto-format:
|
auto-format:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: gr2m/app-token-action@v1
|
- uses: actions/github-app-token@v1
|
||||||
id: app-token
|
id: app-token
|
||||||
with:
|
with:
|
||||||
# required
|
# required
|
||||||
|
|||||||
@@ -22,6 +22,12 @@
|
|||||||
"branches": [
|
"branches": [
|
||||||
"+([0-9]).x",
|
"+([0-9]).x",
|
||||||
"main"
|
"main"
|
||||||
|
],
|
||||||
|
"plugins": [
|
||||||
|
"@semantic-release/commit-analyzer",
|
||||||
|
"@semantic-release/release-notes-generator",
|
||||||
|
"@semantic-release/github",
|
||||||
|
"semantic-release-plugin-github-breaking-version-tag"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user