Citellus GitHub Action

GitHub Actions

Github has recently included the ability to define ‘actions’ or ‘workflows’ to execute on the repositories.

The pros:

  • It’s defined in a yaml inside the repository
  • Allows defining secrets via the web UI for tokens, etc
  • Extensive marketplace of actions and easily extensible

Citellus and GHA

We’ve moved some of the CI in the repository from Travis to GHA to take advantage of this approach so now (check .github/ folder):

  • Package version upload (when a new release is created, package is uploaded to pypi)
  • Tagging of relevant versions (when X.Y.Z is released, new tags are added for X.Y and X pointing to the same files)
  • Python unit testing
  • pre-commit validation
  • Broken link checker for documents
  • Labeling of issues
  • Closing old issues/PR’s when not updated
  • Generation of website for https://citellus.org
  • Managing of dependencies for actions, packages
  • etc

The path to Citellus Github Action

With the recent changes in Citellus What’s new like the extra plugin tree and configuration path, we were already on the path to get more Citellus automation….

https://github.com/citellusorg/gh-action-citellus has been created for that purpose.

It defines via the action.yml the steps to setup Citellus and via the entrypoint.sh install dependencies, sets up permissions and then runs Citellus against the defined folder to store the output and serve the report via GitHub pages web server.

You can check one repository using it at https://github.com/iranzo/ipival/ and see the html output at https://iranzo.github.io/ipival/.

As it’s always easier to learn by an example, check those files:

1
2
3
4
5
- uses: citellusorg/[email protected]
    env:
    GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
    SOSREPORT: test
    CONFIGPATH: "./"

Enjoy!

social