Skip to content

fixup! Try revoking token #48

fixup! Try revoking token

fixup! Try revoking token #48

Workflow file for this run

name: Test
on:
push:
branches-ignore:
- main
jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: 20
cache: npm
- run: npm ci
- run: npm run build
- run: npm run prettier -- --check
# Optional integration test of the action using a dedicated GitHub App.
- id: create_token
if: ${{ vars.TEST_GITHUB_APP_ID != '' }}
uses: ./
with:
# 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 }}
- name: Revoke token
env:
GITHUB_TOKEN: ${{ steps.create_token.outputs.token }}
run: >-
gh api --header "X-GitHub-Api-Version: 2022-11-28" --method DELETE /installation/token
- name: Revoke token (again)
env:
GITHUB_TOKEN: ${{ steps.create_token.outputs.token }}
run: >-
gh api --header "X-GitHub-Api-Version: 2022-11-28" --method DELETE /installation/token
- run: node --eval "assert('${{ steps.create_token.outputs.token }}'.length > 0);"
if: ${{ steps.create_token.outcome != 'skipped' }}