forked from PipedreamHQ/pipedream
-
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.
PR for Verify all modified component versions are incremented (Pipedr…
…eamHQ#3527) * PR for Verify all modified component versions are incremented * Added some console logs * Testing the fix with console logs * Fixed when dependency was not even commited
- Loading branch information
Showing
31 changed files
with
1,091,357 additions
and
41 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,41 @@ | ||
# Git diff on components action | ||
|
||
This action takes care of all components with dependencies that were modified but the version was not incremented. | ||
|
||
## Inputs | ||
|
||
### `base_commit` | ||
|
||
**Required** Base commit SHA. | ||
|
||
### `head_commit` | ||
|
||
**Required** Head commit SHA. | ||
|
||
### `all_files` | ||
|
||
**Required** List of all files comming from `changed_files` step in `check_version` job github action workflow. It is necessary to set the action `jitterbit/get-changed-files@v1` output in json format like | ||
``` | ||
... | ||
with: | ||
format: json | ||
``` | ||
in that way `steps.changed_files.outputs.all` will be converted in array of strings | ||
|
||
## Example usage | ||
|
||
```yaml | ||
- name: Check git diff for version changes | ||
uses: ./.github/actions/git-diff-on-components | ||
with: | ||
all_files: ${{ steps.changed_files.outputs.all }} | ||
base_commit: ${{ github.event.pull_request.base.sha }} | ||
head_commit: ${{ github.event.pull_request.head.sha }} | ||
``` | ||
## Build | ||
You need to push all files generated in `dist` folder once you are finished with the build to test the new version of the github action in case you want to make modifications. | ||
``` | ||
$ cd .github/actions/git-diff-on-components/ | ||
$ npm i && npm run build | ||
``` |
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,15 @@ | ||
name: "Git diff on components" | ||
description: "Check for version changes on components. Diff the changes in the HEAD ref (new branch) against the BASE ref (target branch, e.g. master). If the changes don't contain modifications to the version, we want to log that fact but not exit early. Once we've checked all files, exit the script if any files failed to modify version" | ||
inputs: | ||
base_commit: | ||
description: "Base commit SHA" | ||
required: true | ||
head_commit: | ||
description: "Head commit SHA" | ||
required: true | ||
all_files: | ||
description: "List of all files comming from changed_files step in check_version job github action workflow" | ||
required: true | ||
runs: | ||
using: "node16" | ||
main: "dist/index.js" |
Oops, something went wrong.