Skip to content

Allow defining outputs for GHA jobs - #845

Merged
armanbilge merged 6 commits into
typelevel:mainfrom
rpiaggio:job-outputs
Dec 16, 2025
Merged

armanbilge merged 6 commits into
typelevel:mainfrom
rpiaggio:job-outputs

Conversation

@rpiaggio

Copy link
Copy Markdown
Contributor

Allow defining outputs for jobs: https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-syntax#jobsjob_idoutputs.

Values are automatically interpreted as expressions, ie, wrapped in ${{ ... }.

Comment thread build.sbt Outdated
import com.typesafe.tools.mima.core._

ThisBuild / tlBaseVersion := "0.8"
ThisBuild / tlBaseVersion := "0.9"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this be accomplished without bumping the version here? This is effectively a major version change, with all that entails for libraries. I haven't looked closely at whether it's necessary or not.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried that first but the Mima check failed without the version bump, so I sent another commit with it.

container: Option[JobContainer] = None,
environment: Option[JobEnvironment] = None,
concurrency: Option[Concurrency] = None,
outputs: Map[String, String] = Map(),

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the binary-breaking change. To restore binary-compatibility, we need to keep an overload of apply with the old signature, that can delegate to the new one.

It's also a source-breaking change: outputs should be added as the final parameter in the list.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I moved output to the last place, but it's not possible to define overloads with default arguments. What do you recommend?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's not possible to define overloads with default arguments

That's okay: just define the overload with the old signature without default arguments.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bincompat required a number of other changes.

@rpiaggio
rpiaggio requested review from armanbilge and bpholt November 4, 2025 21:53
@armanbilge
armanbilge merged commit 262283a into typelevel:main Dec 16, 2025
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants