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

Unify sbt-matrix.yml and sbt.yml into cmd.yml #19

Merged
merged 11 commits into from May 5, 2022
Merged

Unify sbt-matrix.yml and sbt.yml into cmd.yml #19

merged 11 commits into from May 5, 2022

Conversation

mkurz
Copy link
Member

@mkurz mkurz commented May 2, 2022

I tested this in

Please see playframework/playframework#11259 (comment):
I removed the scala input, we don't need it anymore, you can just add a scala dimension instead.

If we merge that I suggest to release that as v2.

@ihostage What do you think?

@mkurz mkurz requested a review from ihostage May 2, 2022 07:58
scala: ${{ fromJson(inputs.scala) }}
include: ${{ fromJson(inputs.include) }}
exclude: ${{ fromJson(inputs.exclude) }}
matrix: ${{fromJson(needs.prepare-matrix.outputs.matrix)}}
Copy link
Member Author

Choose a reason for hiding this comment

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

By default, matrix has only one dimension java.

Copy link
Member Author

Choose a reason for hiding this comment

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

So java will always be available in cmd via MATRIX_JAVA.

- name: Custom Cache
uses: actions/cache@v2
if: ${{ inputs.cache-key != '' && inputs.cache-path != '' }}
with:
key: ${{ inputs.cache-key }}
key: ${{ format(inputs.cache-key, matrix.java) }}
Copy link
Member Author

Choose a reason for hiding this comment

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

This substitution is needed for https://github.com/playframework/playframework/pull/11259/files#diff-063ca77e012f959eba648db60e6868875fd1e70e5f5ac081193d848f8d61ef32R90:
play-published-local-jdk{0}-...
So if the key contains {0} it will be replaced with the java version. IMHO that is ok, because the java input always exists. If the key does not contain {0} it does not matter, format will just return the original string.

@mkurz
Copy link
Member Author

mkurz commented May 4, 2022

I added two more example how this will look like when merged:

As you can see for sbt.ymlwe can just replace it with cmd.yml and for sbt-matrix.yml the scala input will be replaced with a add-dimensionsconfig (like I said, some jobs don't even need a scala version)

@ihostage
Copy link
Member

ihostage commented May 4, 2022

If we merge that I suggest to release that as v2.

I absolutely agree 👍
After merge #20 to this branch, we should replace a tag v1 to v2 in README.md.

ihostage and others added 2 commits May 5, 2022 22:43
* Docs
* Add `ref` parameter to any workflows for checkout to special branch, tag or SHA
@mkurz mkurz merged commit ebeec94 into main May 5, 2022
@mkurz mkurz deleted the dynamic_matrix branch May 5, 2022 20:46
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