Skip to content
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

actions: Build Docker container containing FORD #649

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

kc9jud
Copy link
Contributor

@kc9jud kc9jud commented Apr 28, 2024

This constructs an Alpine-based Docker image with FORD installed. This can then be used for CI/CD builds of documentation for projects. For instance, one could then use this for GitLab pages:

.gitlab-ci:

# The Docker image that will be used to build your app
image: ghcr.io/Fortran-FOSS-Programmers/ford:latest
pages:
  script:
    - mkdir -p public
    - ford -o public README.md
  artifacts:
    paths:
      # The folder that contains the files to be exposed at the Page URL
      - public
  rules:
    # This ensures that only pushes to the default branch will trigger
    # a pages deploy
    - if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH

@ZedThree
Copy link
Member

Thanks @kc9jud! Is this just to get graphviz installed? It's not immediately obvious to me why this basically couldn't just be pip install ford, rather than building from source directly?

@kc9jud
Copy link
Contributor Author

kc9jud commented Apr 29, 2024

@ZedThree To get GraphViz to work I just had to switch back to python:3-slim rather than python:3-alpine...

No, you're right that it could just be pip install ford if it were part of the PyPI pipeline -- building from source was a way of solving the race condition of publishing to PyPI vs downloading/installing from PyPI. You don't want the image for v7.0.6 having v7.0.5 inside because it pulled from PyPI before the publish job finished.

It also means that, for example, ghcr.io/kc9jud/ford:master is an image which always has the latest commit to master, in addition to ghcr.io/kc9jud/ford:latest which has the most recent release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants