Skip to content

Commit

Permalink
fixup! Try revoking token
Browse files Browse the repository at this point in the history
  • Loading branch information
tibdex committed Sep 9, 2023
1 parent 40faa50 commit f15ff62
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ jobs:
# The only required permission is `Repository permissions > Metadata: Read-only`.
app_id: ${{ vars.TEST_GITHUB_APP_ID }}
private_key: ${{ secrets.TEST_GITHUB_APP_PRIVATE_KEY }}
- run: node --eval "assert('${{ steps.create_token.outputs.token }}'.length > 0);"
if: ${{ steps.create_token.outcome != 'skipped' }}
- if: ${{ steps.create_token.outcome != 'skipped' }}
run: node --eval "assert('${{ steps.create_token.outputs.token }}'.length > 0);"
- run: echo "The created token is masked: ${{ steps.create_token.outputs.token }}"
- run: npm run prettier -- --check
9 changes: 2 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ jobs:
job:
runs-on: ubuntu-latest
steps:
- name: Create token
id: create_token
- id: create_token
uses: tibdex/github-app-token@v2
with:
app_id: ${{ secrets.APP_ID }}
Expand All @@ -44,11 +43,7 @@ jobs:
# repositories: >-
# ["actions/toolkit", "github/docs"]

- name: Use token
env:
TOKEN: ${{ steps.create_token.outputs.token }}
run: |
echo "The created token is masked: ${TOKEN}"
- run: "echo 'The created token is masked: ${{ steps.create_token.outputs.token }}'"
```
[Another use case for this action can (or could) be found in GitHub's own docs](https://web.archive.org/web/20230115194214/https://docs.github.com/en/issues/planning-and-tracking-with-projects/automating-your-project/automating-projects-using-actions#example-workflow-authenticating-with-a-github-app).

0 comments on commit f15ff62

Please sign in to comment.