name: Test get-installation-token on: push: branches: [main] workflow_dispatch: permissions: id-token: write contents: read jobs: test-token: runs-on: ubuntu-latest steps: - name: Get installation token id: token uses: pullfrog/pullfrog/get-installation-token@main - name: Verify token with Node.js env: GITHUB_TOKEN: ${{ steps.token.outputs.token }} run: | node -e ' const res = await fetch("https://api.github.com/installation/repositories?per_page=1", { headers: { Authorization: "token " + process.env.GITHUB_TOKEN, Accept: "application/vnd.github+json", }, }); if (!res.ok) throw new Error("GET installation/repositories failed: " + res.status + " " + (await res.text())); const data = await res.json(); console.log("authenticated — installation has access to", data.total_count, "repo(s)"); console.log("first repo:", data.repositories[0].full_name); '