Determines if there are changes based on patterns or expressions against file blobs within the repo.
Utilizes minmatch for glob comparisions.
See https://globster.xyz/ and https://datacadamia.com/lang/regexp/glob for help in pattern syntax
| Parameter | Is Required | Default | Description |
|---|---|---|---|
github-token |
true | Token required to compare and identify changes against GitHub repo. | |
reference |
false | Current context | Reference to evaluate for changes. |
base-reference |
false | Latest release | Base reference to compare against. |
pattern |
false | Identify changes with defined blob matching pattern. Can supply multiple on seperate lines. | |
exclude-pattern |
false | Excludes identified changes. Can supply multiple on seperate lines. | |
patterns |
false | Identify changes with these defined blob matching patterns outputing individual results | |
options |
false | see action definition | Options when comparing using blob patterns; see minmatch. |
Additional inputs can be found on the action definition
| Output | Description |
|---|---|
result |
true or false if any changes were identified |
| patterns... | For each typed-pattern, an output will be produced with a true / false value if changes identified |
jobs:
jobname:
runs-on: ubuntu-latest
steps:
- name: Identify Changes
uses: im-enrollment/identify-changes-actionn@latest
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
pattern: | # concatenates patterns into {src/ProjectName/**,src/ProjectName2/**}
src/ProjectName/**
src/ProjectName2/**
exclude-pattern: |
src/ProjectName/**/*.js
# Step Output Vars
outputs.result = 'true'
# ----------------------------------
- name: Identify Multiple Changes
uses: im-enrollment/identify-changes-actionn@latest
id: identify-changes
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
reference: ${{ github.ref_name }}
patterns: |
{
"projectA": "src/ProjectA/**",
"projectB:" "src/ProjectB/**",
"frontEndTests": "src/ProjectA/FrontEnd/*.tests.js",
"systemTests": "tests/**"
}
# Step Output Vars
outputs.result = 'true' // Are there any changes in any of the patterns provided
outputs.projectA = 'false'
outputs.projectB = 'true'
outputs.frontEndTests = 'false'
outputs.systemTests = 'false'See workflow automated test for more examples
When creating new PRs please ensure:
- The action has been recompiled. See the Recompiling section below for more details.
- For major or minor changes, at least one of the commit messages contains the appropriate
+semver:keywords listed under Incrementing the Version. - The
README.mdexample has been updated with the new version. See Incrementing the Version. - The action code does not contain sensitive information.
If changes are made to the action's code in this repository, or its dependencies, you will need to re-compile the action.
# Installs dependencies and bundles the code
npm start
# Bundle the code (if dependencies are already installed)
npm run buildThese commands utilize esbuild to bundle the action and
its dependencies into a single file located in the dist folder.
This action uses git-version-lite to examine commit messages to determine whether to perform a major, minor or patch increment on merge. The following table provides the fragment that should be included in a commit message to active different increment strategies.
| Increment Type | Commit Message Fragment |
|---|---|
| major | +semver:breaking |
| major | +semver:major |
| minor | +semver:feature |
| minor | +semver:minor |
| patch | default increment type, no comment needed |
This project has adopted the im-open's Code of Conduct.
Copyright © 2022, Extend Health, LLC. Code released under the MIT license.