-
Notifications
You must be signed in to change notification settings - Fork 3
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
Publish a container #208
Comments
Note the files are currently unused. Refs #1817, unsplash/intlc#208
Hey, nice to hear you might find intlc useful! 🙂 I'll look into adding an action shortly. In the meantime, if you happen to be familiar with Nix, this is the derivation we use at Unsplash for our dev shells incl/ CI: { fetchurl, lib, stdenv }:
stdenv.mkDerivation rec {
pname = "intlc";
version = "0.8.3";
src = if stdenv.isDarwin
then fetchurl {
url = "https://github.com/unsplash/intlc/releases/download/v${version}/intlc-v${version}-macos-aarch64";
sha256 = "f4p9q0hlQrPydJQTveVLRdUOsMRPsBE0Lc2NpumHJBA=";
}
else fetchurl {
url = "https://github.com/unsplash/intlc/releases/download/v${version}/intlc-v${version}-linux-x86_64";
sha256 = "+F42fvw/ykOoG9f4rNXvgusioy6MSIjet/jt8ffvJ1I=";
};
dontUnpack = true;
installPhase = ''
mkdir -p $out/bin/
cp $src $out/bin/intlc
chmod +x $out/bin/intlc
'';
meta = {
homepage = "https://github.com/unsplash/intlc";
description = "Compile ICU messages into code.";
license = lib.licenses.mit;
platforms = [ "x86_64-linux" "aarch64-darwin" ];
};
} (Though notably as per #99 this wouldn't run on NixOS proper without some dynamic link patching.) |
Hey, you can give this a try: https://github.com/unsplash/setup-intlc For now you'll need to target |
Thanks @samhh, I managed to get that working in Act locally. Having a container itself available would still be useful: our current setup has https://github.com/PREreview/prereview.org/blob/201089e90883466bf315a666ab701b5237e0a18d/Dockerfile#L14-L25 which things like Dependabot won't be able to update for us. (That said, it wouldn't know how to update the version in the Action anyhow...) |
I was hoping to make the action container-based but then it was unclear how to automate/generalise versioning. By contrast the current solution should continue to work with new releases of intlc provided the releases file pattern is unchanged. Generally I'd be happy to add a container - you've already got one that works! - but I'm unsure how I could do so in such a way that wouldn't incur a maintenance burden upon all new releases. Also |
Thanks, we're using the Action now. It should be possible to add steps to your 'publish' job (or, maybe better, a job that follows on) to publish an image without any overhead. Following something like https://github.com/tests-always-included/mo/blob/7e86c1a5f525f352983077d743c2ce2f5d75f4fa/.github/workflows/release.yaml#L29-L45 to deploy to GitHub's Container Registry looks reasonably straightforward (but I've not tried this before... 😅). |
Turns out our container didn't work on Apple silicon: PREreview/prereview.org@0260b81 mitigates the issue, but does leave Docker emitting a 'InvalidBaseImagePlatform' warning. I've not had to deal with multi-architecture Docker before, but I think the only way to remove the warning is to make the whole thing multi-architecture. Docker has the FROM debian:12.6-slim AS intlc
ARG BUILDARCH
[...]
ADD https://github.com/unsplash/intlc/releases/download/v0.8.3/intlc-v0.8.3-linux-$BUILDARCH /usr/local/bin/intlc |
Thanks for intlc, it's really cool! We're looking at using it in our setup, which involves running it in a few places, including GitHub Actions.
Would it be possible to publish a Docker container to make it easier to use, especially in GH Actions?
So far we've been using a local image:
But using it in Actions might be a bit tricky. (We can probably build and use it in the job itself, but complicated jobs are hard to develop/debug...)
The text was updated successfully, but these errors were encountered: