mirror of
https://codeberg.org/mfenniak/oidc-jwt.git
synced 2026-12-04 09:24:22 +11:00
Experimental: This is currently just a test ground for an action like this, and won't be maintained.
Action which simplifies access to
enable-openid-connect: true OIDC JWTs in Forgejo Actions
- Rust 41.1%
- Shell 35.8%
- Nix 23.1%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| .forgejo | ||
| src | ||
| .envrc | ||
| .gitignore | ||
| action.yml | ||
| Cargo.lock | ||
| Cargo.toml | ||
| CHANGELOG.md | ||
| flake.lock | ||
| flake.nix | ||
| README.md | ||
| renovate.json5 | ||
oidc-jwt
This Forgejo Action allows you to easily retrieve a JWT from Forgejo Action's OpenID Connect capability, which can then be used to authenticate to other services.
Example:
- id: my-jwt
uses: https://codeberg.org/mfenniak/oidc-jwt@v1
with:
# Audience for the JWT, which becomes the `aud` claim:
audience: 'required-value'
- run: echo "Your JWT is now available at ${{ steps.my-jwt.outputs.jwt }}"
This Action replaces a pretty simple operation: making an HTTP request to $ACTIONS_ID_TOKEN_REQUEST_URL&audience=$OIDC_AUD, retrieving a JSON document, and extracting a JWT from it.
The job container that you run must have some tool which can be used to make an HTTP request. At least one of these supported tools must be available:
curl+jqnodepython3