-
Notifications
You must be signed in to change notification settings - Fork 7
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
Conversation
We can access env variables in caller workflow in jobs.<job_id>.with.<with_id> Also wen can't use bash $... syntax because this will not be run in bash So this is to only workaround I can think of right now...
scala: ${{ fromJson(inputs.scala) }} | ||
include: ${{ fromJson(inputs.include) }} | ||
exclude: ${{ fromJson(inputs.exclude) }} | ||
matrix: ${{fromJson(needs.prepare-matrix.outputs.matrix)}} |
There was a problem hiding this comment.
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
.
There was a problem hiding this comment.
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) }} |
There was a problem hiding this comment.
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.
I added two more example how this will look like when merged: As you can see for |
I absolutely agree 👍 |
* Docs * Add `ref` parameter to any workflows for checkout to special branch, tag or SHA
Improve universal CMD task
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?