Skip to content
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

Allow passing a path to YAML actions #339

Merged
merged 3 commits into from
Aug 31, 2023
Merged

Allow passing a path to YAML actions #339

merged 3 commits into from
Aug 31, 2023

Conversation

taras
Copy link
Member

@taras taras commented Aug 31, 2023

Motivation

The original YAML actions were designed to change YAML documents using URLs from source location annotation. Modifying files from the file system without cloning the repository would be helpful.

Approach

Allow the url argument to be a relative or absolute path in addition to a regular url.

  1. Deletect if a URL in which case it executed previous logic
  2. When not a URL, for a relative path, calculate path by appending to the workspace directory
  3. When not a URL, for an absolute path, just read the file from the absolute path.

@changeset-bot
Copy link

changeset-bot bot commented Aug 31, 2023

🦋 Changeset detected

Latest commit: 6f6756d

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
backend Patch
@frontside/scaffolder-yaml-actions Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@taras taras merged commit b4e907e into main Aug 31, 2023
3 checks passed
@taras taras deleted the tm/allow-path branch August 31, 2023 01:52
@frontsidejack
Copy link
Member

📣 NOTIFICATION
You are receiving this message because we did not publish any packages.

Generated by @thefrontside/actions Frontside

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants