-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Initial version #1
Conversation
…parate lists for creating and updating
Co-authored-by: Mari <[email protected]>
The `sync-templates` action accepts the following inputs: | ||
- `api-token` (**required**) - the Fiberplane API token used to access the workspace | ||
- `workspace-id` (**required**) - the ID of the workspace where the Templates should be sync'ed to | ||
- `templates-directory` (optional) - directory where valid Templates `*.jsonnet` files are located, default: `.fiberplane/templates/` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was thinking, maybe we should make the default without a .
prefix. So something like fiberplane/templates/
To me a hidden directory is something that is secondary to the repo. For example having your own code is the primary use case of a application repo, but it might also contain a .github
directory containing workflows. In the case of this action it will be run on a infrastructure like repo, where its main purpose is to store the templates.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't entirely agree here. I was actually thinking that the primary way this would be used would be per team / per project basis (kinda like hooks or workflows). Teams and/or projects might want to have project-specific templates attached in which case they become like a workflow associated with the repository code. Hence the .fiberplane/
prefix
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't entirely agree here. I was actually thinking that the primary way this would be used would be per team / per project basis (kinda like hooks or workflows). Teams and/or projects might want to have project-specific templates attached in which case they become like a workflow associated with the repository code. Hence the
.fiberplane/
prefix
This kinda goes against what is planned and what you mentioned earlier, that if a template is not defined in the directory then it should be deleted. Ie. the directory should match the templates that are created 1to1. If the idea is to have this in multiple directories than that workflow is not possible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah that's a good point. I'm personally not yet entirely settled how the delete
workflow should work but this is a good gotcha to keep in mind when we're discussing it
Co-authored-by: Benno van den Berg <[email protected]>
This PR creates a first version of a GitHub action that syncs the committed Fiberplane templates in a repo with your Fiberplane workspace.
The action requires at least the following inputs:
fp tokens create
)The basic features are:
.fiberplane/templates
) for new/changed*.jsonnet
filesfp update
command, for those that don't -fp create
Some basic assumptions: