The fiberplane/sync-templates
action is a utility that syncs your Fiberplane Templates from a designated directory in your repository with your Fiberplane Workspace.
This action can be run on ubuntu-latest
and macos-latest
GitHub Actions runners.
A minimum working example of the action:
steps:
- uses: fiberplane/sync-templates@v1
with:
api-token: ${{ secrets.FP_TOKEN }} # it is best practice to keep your secrets in GitHub Secrets
workspace-id: <your_workspace_id> # you can look it up with: fp workspaces list
The sync-templates
action accepts the following inputs:
api-token
(required) - the Fiberplane API token used to access the workspaceworkspace-id
(required) - the ID of the workspace where the Templates should be sync'ed totemplates-directory
(optional) - directory where valid Templates*.jsonnet
files are located, default:.fiberplane/templates/
fp-version
(optional) - explicit version of thefp
CLI that should be used in the action, default:latest
fp-base-url
(optional) - the base URL of the Fiberplane API, defaultstudio.fiberplane.com
When run the action will:
- Download, setup, and cache the Deno runtime and the Fiberplane CLI (
fp
). - Validate that the intended Templates are syntactically correct.
- Create and/or upload the intended Templates to a Fiberplane Workspace