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

Documentation for object-format #83

Open
ni-mkrieg opened this issue Nov 2, 2021 · 5 comments
Open

Documentation for object-format #83

ni-mkrieg opened this issue Nov 2, 2021 · 5 comments
Assignees
Labels
documentation Improvements or additions to documentation enhancement New feature or request good first issue Good for newcomers

Comments

@ni-mkrieg
Copy link

Hey Noel,

great action, I could not find any other S3 uploader that supports Wasabi.

Could you please add an example to your readme that shows how to use the object-format to rename a file on upload ot place it into a subfolder inside the select bucket?

alternatively, it would be great to be able to add the desired subfolder to another property.

gruss,
Markus

@auguwu
Copy link
Member

auguwu commented Nov 2, 2021

Sure, I can do that and thanks for using my GitHub action! ^w^

For now, refer to this:

object-format can have two keys you can use:

  • $(file) - Returns the file name that the action is going to upload
  • $(branch) - Returns the branch the action is running on.

If you were planning on wanting more than those 2, create a issue and I'll consider it; if it is viable. :3

@auguwu auguwu self-assigned this Nov 2, 2021
@auguwu auguwu added documentation Improvements or additions to documentation enhancement New feature or request good first issue Good for newcomers labels Nov 2, 2021
@ni-mkrieg
Copy link
Author

so if I want to put all uploaded files into a subfolder called "foo" the syntax would be this?

object-format: "foo/$(file)"

@auguwu
Copy link
Member

auguwu commented Nov 3, 2021

If you want sure, but all the files in a directory are already being recursed by my utility function readdir, which does recursion on every directory it hits, so I don't think using object-format is recommended in this case. :3

I added the property so you can do {version}/$(file), $(branch)/$(file) which will do:

  • 0.3.0/{file}
  • trunk/{file}

@ni-mkrieg
Copy link
Author

gotcha, so I can just create the subfolder structure inside the folder that I hand to "directories" sounds like. even easier!

@auguwu
Copy link
Member

auguwu commented Nov 3, 2021

Yea! :D
I'll keep this issue until I update the action to have documentation on a seperate website. 💜

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants