From f15ff621be336ec0a14d5e7b7d262c59d4bf7a8a Mon Sep 17 00:00:00 2001 From: Thibault Derousseaux Date: Sat, 9 Sep 2023 15:02:34 -0400 Subject: [PATCH] fixup! Try revoking token --- .github/workflows/test.yml | 5 +++-- README.md | 9 ++------- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8b20326..757d22c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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 diff --git a/README.md b/README.md index 901a4f8..1b5a20b 100644 --- a/README.md +++ b/README.md @@ -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 }} @@ -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).