avivace / iosevka-docker

Docker containers to build custom (or upstream) versions of the Iosevka typeface and package them for Debian
https://hub.docker.com/r/avivace/iosevka-build
Creative Commons Zero v1.0 Universal
29 stars 12 forks source link

Error when building font on Github Action #13

Closed NNBnh closed 1 year ago

NNBnh commented 2 years ago

Hello, I have trying to automatically build the font with Github Action recently and I come up this this setting:

name: CI

on:
  push:
    branches: [ main ]
  pull_request:
    branches: [ main ]

  workflow_dispatch:

jobs:
  build:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v3

      - name: Remove old build
        run: rm -rf dist

      - name: Build fonts
        run: docker run -it -v $(pwd):/build avivace/iosevka-build

File's link

But when run it show this error:

image

So I try to fix it:

        - name: Build fonts
-         run: docker run -it -v $(pwd):/build avivace/iosevka-build
+         run: docker run -i -v $(pwd):/build avivace/iosevka-build

Now it run for a bit but still exit without building:

image

I'm still learning Docker so I'm not sure if this is a bug or I'm missing something, could you take a look please?

jhilker98 commented 2 years ago

I've also noticed the issue.

For some reason now, I've been unable to reproduce the issue in an action, and I'm not sure why. I will keep digging into it and let you know what I find.

JuanM04 commented 2 years ago

Maybe it's related to #10. I added the env var and it worked.

Side note: that bug was fixed but never published to DockerHub.

AZMCode commented 2 years ago

I have replicated it and found an answer. Running a shell inside the container and running with bash -x /run.sh reveals that the script fails because of mkdir /tmp/build tries to create a directory that already exists. Just add -p to that command and it's golden. I also experience the error where the script will fail if no font version is given, but that's another issue.

AZMCode commented 2 years ago

Working on a solution to both problems.

AZMCode commented 2 years ago

Specifically, I cannot believe the script doesn't use the GitHub JSON API, instead parsing a raw HTML page with grep :/

Fixed that quite quick. Building the dockerfile to test my fixes rn.

AZMCode commented 2 years ago

Everything works as expected on both ends. Imma submit a pull request soon.