Writing GitHub Actions workflows in Elixir

almirsarajcic

almirsarajcic

Created 7 months ago

Wouldn’t it be great if it was possible to write GitHub Actions workflows in Elixir?

[
  name: "CI",
  on: [
    pull_request: [],
    push: [
      branches: ["main"]
    ]
  ],
  jobs: [
    compile: compile_job(),
    credo: credo_job(),
    dialyzer: dialyzer_job(),
    format: format_job(),
    test: test_job(),
  ]
]

It is possible. In fact, that was an excerpt from our github_workflows_generator repo:
optimumBA/github_workflows_generator/…/.github/github_workflows.ex#L15-L34.

Learn how to do it: https://optimum.ba/blog/maintaining-github-actions-workflows.