-
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
Workflows improvements (ENVs, Caches, Include/Exclude) #4
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,15 +28,20 @@ This workflow is used for running a single SBT task. It can to use for running a | |
|------------|-------|--------------------|---------|----------------------| | ||
| cmd | 1.0.0 | :exclamation: | - | Running command | | ||
| java | 1.0.0 | :heavy_minus_sign: | 8 | _AdoptJDK_ version | | ||
| scala | 1.0.0 | :heavy_minus_sign: | '' | _Scala_ version | | ||
| cache-key | 1.0.0 | :heavy_minus_sign: | '' | Key of custom cache | | ||
| cache-path | 1.0.0 | :heavy_minus_sign: | '' | Path of custom cache | | ||
| env | 1.0.0 | :heavy_minus_sign: | '' | Custom ENV vars | | ||
|
||
**How to use**: | ||
|
||
```yaml | ||
uses: playframework/.github/.github/workflows/sbt.yml@v1 | ||
with: | ||
cmd: sbt test | ||
cmd: sbt "-Dvar1=$VAR_1" "-Dvar2=$VAR_2" ++$SCALA_VERSION test | ||
env: | | ||
VAR_1=value | ||
VAR_2=value | ||
Comment on lines
+41
to
+44
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Isn't that enough to just call There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, maybe it's not a good example. 😞 cmd: "script/big-task.sh"
env: |
VAR1=value
VAR2=value Secondly, when GA will support YAML Anchors (actions/runner#1182), we will try to use anchor with env vars in parent workflow and just add them to many jobs instead of copy&paste vars as now (see my draft for main repo playframework/playframework#11142). 🤞 |
||
``` | ||
|
||
### Java/Scala matrix SBT task | ||
|
@@ -53,11 +58,17 @@ This workflow is used for running an SBT task on matrix of Java/Scala versions. | |
|
||
**Parameters**: | ||
|
||
| Parameter | Since | Required | Default | Description | | ||
|-----------|-------|-----------------|---------|--------------------| | ||
| cmd | 1.0.0 | :exclamation: | - | Running command | | ||
| java | 1.0.0 | :exclamation: | - | _AdoptJDK_ version | | ||
| scala | 1.0.0 | :exclamation: | - | _Scala_ version | | ||
| Parameter | Since | Required | Default | Description | | ||
|------------|-------|--------------------|---------|----------------------| | ||
| cmd | 1.0.0 | :exclamation: | - | Running command | | ||
| java | 1.0.0 | :exclamation: | - | _AdoptJDK_ version | | ||
| scala | 1.0.0 | :exclamation: | - | _Scala_ version | | ||
| include | 1.0.0 | :heavy_minus_sign: | [] | Matrix include's | | ||
| exclude | 1.0.0 | :heavy_minus_sign: | [] | Matrix exclude's | | ||
| cache-key | 1.0.0 | :heavy_minus_sign: | '' | Key of custom cache | | ||
| cache-path | 1.0.0 | :heavy_minus_sign: | '' | Path of custom cache | | ||
| env | 1.0.0 | :heavy_minus_sign: | '' | Custom ENV vars | | ||
|
||
|
||
**How to use**: | ||
|
||
|
@@ -68,7 +79,10 @@ with: | |
[ "11", "8" ] | ||
scala: >- | ||
[ "2.12.15", "2.13.8", "3.0.2" ] | ||
cmd: sbt test | ||
cmd: sbt "-Dvar1=$VAR_1" "-Dvar2=$VAR_2" ++$SCALA_VERSION test | ||
env: | | ||
VAR_1=value | ||
VAR_2=value | ||
``` | ||
|
||
### Publishing to Sonatype | ||
|
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.
what's the use case for this?
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.
It's just to support an existed GA matrix behavior.
https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#example-including-additional-values-in-combinations
It can be useful in the future when we will want to have a more special matrix strategy than the cartesian product of two array with Java and Scala versions.