typelevel / typelevel/sbt-typelevel

Trigger a re-usable workflow

Open
#795 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Scala
Stars
185
Forks
62
PR merge metrics
No merged PRs in 30d

Description

The current WorkflowJob class emphasizes 'steps' but there is another way to create job by using a reusable workflow.

In order to add support for reusable workflows in our current WorkflowJob type should we.

  1. Add uses, with and secrets to the current WorkflowJob
  2. Split WorkflowJob into 2 sub types, WorkflowStepJob (or something) and WorkflowReusableJob with the parent of WorkflowJob.

The cons to approach 1 is uses, with, and secrets are ONLY for reusable jobs and would introduce the ability to construct an invalid job.

The cons to approach 2 are that its clearly binary breaking. But this MIGHT be worth it given the issues with approach 1.

Happy to submit a PR to address this, but would like to know which approach to use before i begin.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with github-actions/src/main/scala/org/typelevel/sbt/gha/WorkflowJob.scala and the linked GitHub Actions reusable-workflow syntax. Compare the two proposed API designs, including compatibility implications, and seek a maintainer decision before coding. Done means reusable jobs support uses, with, and secrets without permitting invalid job configurations.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions, scala
Domain
build-system, ci-cd
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.