Ensures that the version in the artifact descriptor matches the Git branch version - by injecting or merely by checking.
steps:
- uses: giancosta86/aurora-github/actions/enforce-branch-version@v8
with:
mode: inject
Please, note: this action is automatically run by:
and indirectly by:
-
If
mode
is skip, just exit the action flow. -
If
artifact-descriptor
is not specified, try to detect it from a list of supported ones - currently:-
package.json - for 📦NodeJS
-
Cargo.toml - for 🦀Rust
-
-
Evaluate the
mode
input:-
If the value is inject:
-
Every instance of
0.0.0
in the artifact descriptor will be replaced by the branch version -
Display the content of the artifact descriptor
-
-
If the value is check:
-
Display the content of the artifact descriptor
-
Perform a technology-specific version check:
-
for 📦NodeJS, check the version field in package.json
-
for 🦀Rust, check the version field in Cargo.toml
-
for any other technology, verify that the branch version exists at least once in the descriptor
-
-
-
- The
artifact-descriptor
- no matter whether declared or detected - must exist in the file system.
Name | Type | Description | Default value |
---|---|---|---|
mode |
inject ,check ,skip |
How the branch version should be enforced | |
artifact-descriptor |
string | Relative path to the artifact descriptor | |
project-directory |
string | The directory containing the project | . |