-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement action that returns desired maven goal
- Loading branch information
0 parents
commit d835be3
Showing
7 changed files
with
10,298 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.idea | ||
|
||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# Set Revision javascript action | ||
|
||
This action uses the github reference of the caller context, | ||
and returns the desired Maven Revision property according to | ||
our specification. This property is also | ||
exported in the Github Environment as `REVISION`. | ||
Our specification, in short, is as follows: | ||
- Tags remain unchained | ||
- Default branches are renamed to `latest` | ||
- Non-default branches are appended with a `-SNAPSHOT` suffix | ||
|
||
## Inputs | ||
|
||
### acr | ||
|
||
True if the application deploys docker images to Azure Container Registry using Jib, otherwise false. | ||
|
||
### gpr | ||
|
||
True if the application deploys JARs to Github Package Registry, otherwise false. | ||
|
||
## Outputs | ||
|
||
### `revision` | ||
|
||
The appropriate `revision` value. | ||
This value is also exported in the Github Environment as `REVISION`. | ||
|
||
## Example usage | ||
|
||
```yaml | ||
uses: digipost/[email protected] | ||
``` | ||
## Building this project | ||
Make desired changes in `index.js` (and/or other files). Then run | ||
|
||
``` | ||
ncc build index.js | ||
``` | ||
to generate the dist/index.js file | ||
## Links | ||
- [Great guide for creating JavaScript Actions](https://docs.github.com/en/actions/creating-actions/creating-a-javascript-action) | ||
- [Vercel NCC on Github](https://github.com/vercel/ncc) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
name: 'Set Maven Goals' | ||
description: 'Exports a MVN_GOALS environment variable based on combination of input variables' | ||
inputs: | ||
acr: | ||
description: True if the app deploys docker images to Azure Container Registry, otherwise false | ||
required: false | ||
default: 'false' | ||
gpr: | ||
description: True if the app deploys JARs to Github Package Registry using deploy, otherwise false | ||
required: false | ||
default: 'false' | ||
outputs: | ||
maven-goals: | ||
description: 'The value of the maven goal variable' | ||
runs: | ||
using: 'node16' | ||
main: 'dist/index.js' |
Oops, something went wrong.