vl-convert icon indicating copy to clipboard operation
vl-convert copied to clipboard

Idea: Github action

Open zekenie opened this issue 2 years ago • 5 comments

Idea: we use vl-convert in a github action at our company to make various up-to-date svg charts about our codebase health. We're stuck on a pretty old pinned version because of some rust compilation issue I don't want to investigate. I just realized it'd be pretty great if there was a public github action that i could just use instead of setting it up myself. Just wanted to share the idea! I'm sure i'm not the only one who'd use it

zekenie avatar Mar 03 '24 21:03 zekenie

Thanks for the suggestion @zekenie.

Are you currently installing the CLI version of vl-convert with cargo? This will result in compilation from source. We do publish the CLI builds in GitHub Releases, so I suppose a GitHub action could automate the download of the correct release version.

jonmmease avatar Mar 03 '24 22:03 jonmmease

That's correct, i've been installing it with cargo. do you think the linux binary you have on the releases will "just work" in gh action land? it'd be great to be able to say

uses: "vega/vl-convert-action"
with:
  svg: ...
  spec: ...

zekenie avatar Mar 04 '24 00:03 zekenie

do you think the linux binary you have on the releases will "just work" in gh action land?

Yeah, the pre-compiled linux-64, win-64, and osx-64 binaries should all work in GH actions. I haven't written a custom action before, but if you're interested in playing with it I'd be happy to review!

jonmmease avatar Mar 04 '24 11:03 jonmmease

I'd say it's probably cleaner to just download the binary and unpack it instead of having an action. Something like https://github.com/uwdata/mosaic-framework-example/blob/0d960d308245f1dc5d532e177b629f62c1eb8c5f/.github/workflows/deploy.yml#L27 for duckdb. It's easier to debug when something goes wrong or adapt to a different platform.

domoritz avatar Mar 04 '24 16:03 domoritz

@domoritz thanks, that example helps!

zekenie avatar Mar 04 '24 16:03 zekenie