microsoft / aroworkshop

Azure Red Hat OpenShift workshop
Creative Commons Attribution 4.0 International
58 stars 121 forks source link

Fix jekyll build with jekyll-action, and update actions to remove deprecation warnings. #106

Closed jamesread closed 1 year ago

jamesread commented 1 year ago

I validated this against a temporary testing repository and everything works as expected - no deprecation warnings, and a healthy Jekyll build.

However, if this commit does not work, I'll revert the last 3.

jamesread commented 1 year ago

Okay, everything looks healthy now, #104 and #105 build failures mitigated. Let me just explain a little more what happened here.

The Gemfile was using Jekyll -> 4.2, which means "any version after 4.2". When I came to bundle update, and bundle exec etc on my laptop (Fedora Linux), it grabbed Jekyll 4.3, and it's dependencies, including jekyll-sass-converter (which was upgraded from v2 to v3 with Jekyll 4.3 release notes), and that relies on sass-converter. On my laptop, and most other people's machines, Ruby built the sass-converter gem with glibc.

However, fast forward to GitHub actions, the jekyll-action uses an Alpine container, which of course does not use glibc, but musl. That means that the jekyll-action was unable to build sass-converter, and that failed the build. This appears to be a known issue - https://github.com/helaili/jekyll-action/issues/150 that just popped up in the last few weeks.

For now, I've added a lock on jekyll-sass-converter in the Gemfile to v2, and also added a note about why.

Possible future solutions include; wait for jekyll-action to resolve this upstream, lock Jekyll to 4.2 (but that's probably not so good for long term updates), or even better, migrate to asciidoc!