

A GitHub Action that fetches a GitHub installation token from SFP Server for repository authentication. This provides secure, scoped access tokens for your CI/CD workflows.
- name: Get GitHub Tokenid: get-tokenuses: flxbl-io/get-github-token@v1with:
sfp-server-url: ${{ secrets.SFP_SERVER_URL }}sfp-server-token: ${{ secrets.SFP_SERVER_TOKEN }}
- name: Use the tokenrun: | git clone https://x-access-token:${{ steps.get-token.outputs.token }}@github.com/owner/repo.git- name: Get GitHub Tokenid: get-tokenuses: flxbl-io/get-github-token@v1with:
sfp-server-url: ${{ secrets.SFP_SERVER_URL }}sfp-server-token: ${{ secrets.SFP_SERVER_TOKEN }}
- name: Create Issueuses: actions/github-script@v7with:
github-token: ${{ steps.get-token.outputs.token }}script: | await github.rest.issues.create({ owner: context.repo.owner, repo: context.repo.repo, title: 'Automated Issue', body: 'Created via GitHub Action' });- name: Get Token for Another Repoid: get-tokenuses: flxbl-io/get-github-token@v1with:
sfp-server-url: ${{ secrets.SFP_SERVER_URL }}sfp-server-token: ${{ secrets.SFP_SERVER_TOKEN }}repository: 'my-org/another-repo'
- name: Checkout Another Repouses: actions/checkout@v4with:
repository: my-org/another-repotoken: ${{ steps.get-token.outputs.token }}| Input | Description | Required | Default |
|---|
sfp-server-url | URL to the SFP Server instance (e.g., https://your-org.flxbl.io) | Yes | - |
sfp-server-token | SFP Server application token | Yes | - |
repository | Repository name (owner/repo format) | No | Current repository |
| Output | Description |
|---|
token | GitHub installation token (masked in logs) |
- The action calls the SFP Server API endpoint
/sfp/api/repository/auth-token - SFP Server uses the configured GitHub App to generate an installation token
- The token is scoped to the specified repository
- Tokens are cached on SFP Server for 50 minutes to reduce API calls
- The action retries up to 3 times with 5-second delays on failure
- SFP Server instance configured with a GitHub App
- Repository registered as a project in SFP Server
- Application token from SFP Server
| Error | Cause | Resolution |
|---|
Repository not found | Repository not registered in SFP Server | Add repository as a project in SFP Server |
403 Forbidden | Invalid or expired SFP Server token | Verify application token in SFP Server |
Network errors | Temporary connectivity issues | Action will automatically retry |
npm test
npm run test:coverage
npm run lint
npm run format
Copyright 2025 flxbl-io. All rights reserved. See LICENSE for details.