vega / vl-convert

Utilities for converting Vega-Lite specs from the command line and Python
BSD 3-Clause "New" or "Revised" License
84 stars 9 forks source link

Idea: Github action #156

Open zekenie opened 4 months ago

zekenie commented 4 months ago

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

jonmmease commented 4 months ago

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.

zekenie commented 4 months ago

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: ...
jonmmease commented 4 months ago

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!

domoritz commented 4 months ago

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.

zekenie commented 4 months ago

@domoritz thanks, that example helps!