webpro / reveal-md

reveal.js on steroids! Get beautiful reveal.js presentations from any Markdown file
MIT License
3.74k stars 416 forks source link

ci: refactor action to enable multi-arch builds #447

Closed MindTooth closed 1 year ago

MindTooth commented 1 year ago

I reworked the action to support multi-arch builds. Notices that it did not have any and was not able to run it on my Apple Silicon. Some code is borrowed from the various actions.

Notice provenance: false which continue to build the image using older mediatypes. There is still runtimes used that does not support the new types.

Let me know if you need more from me. I'm usually next to a computer for an easy fix. 😄


I've published some images here to test the changes.

webpro commented 1 year ago

Thanks @MindTooth, sounds like a good idea. Personally I don't know much about this and I don't use it myself either.

Looking at the GitHub Action output it gives an error: "Username and password required"

We're using repository: webpronl/reveal-md (note the extra nl), might that be related?

MindTooth commented 1 year ago

My bad. Just pushed a fix.

MindTooth commented 1 year ago

Hmm. 🤔 Not sure why this does not work. I’ve been successfully using the action myself. I did notice that the username needed to be lower case. Also made sure to use your variable name. Maybe I’ve typed it wrong.


Noticed that org.opencontainers.image.licenses is empty.

MindTooth commented 1 year ago

Created a test pull request in my own fork, only changed the image name, and was able to login just fine. https://github.com/MindTooth/reveal-md/pull/1/checks

Care to check if I'm using the correct secret names and if the token is not expired or anything?

MindTooth commented 1 year ago

Can you verify that it looks something similar as mine fork?

Screenshot 2023-03-29 at 10 45 03

Looking at this comment from the action itself https://github.com/docker/login-action/issues/236#issuecomment-1179770617.

webpro commented 1 year ago

Yes it that was setup properly I think, but I created a new access token anyway. Trying on master branch now.

MindTooth commented 1 year ago

Something else I need to do for moving this forward? 😄

Apple Silicon:

$ docker run --rm -it webpronl/reveal-md:master -V
Unable to find image 'webpronl/reveal-md:master' locally
3ab7ed8f550a: Download complete 
1a48d4233f62: Download complete 
b2e6e996e4a8: Download complete 
937e20b5a2d7: Download complete 
762c2470eea4: Download complete 
fefc7d195eee: Download complete 
4f4fb700ef54: Exists 
06fc22ed341f: Download complete 
c41833b44d91: Download complete 
984930a9222d: Download complete 
ab7e1f12004b: Download complete 
a97409de93e9: Download complete 
5.4.1
webpro commented 1 year ago

Let's see what happens now 🤠

MindTooth commented 1 year ago

It works. 🥳 However, it only pushed to master. I don't recall, but that's the correct behavior? latest is last stable release?

webpro commented 1 year ago

Yes, the master branch is basically the only branch. I just pushed a new release (v5.5.0)