Skip to content

Commit

Permalink
feat(get-modified-packages): make base-branch an input in order to be…
Browse files Browse the repository at this point in the history
… testable (#139)

Signed-off-by: Kenji Miyake <[email protected]>
  • Loading branch information
kenji-miyake authored Apr 25, 2022
1 parent 0bcc0a6 commit 855ee88
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/test-composite-actions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,8 @@ jobs:
- name: Run get-modified-packages
id: get-modified-packages
uses: ./get-modified-packages
with:
base-branch: ${{ github.event.repository.default_branch }}

- name: Check result of get-modified-packages
run: |
Expand Down
4 changes: 3 additions & 1 deletion get-modified-packages/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ jobs:
## Inputs
None.
| Name | Required | Description |
| ----------- | -------- | ------------------------------------------------ |
| base-branch | false | The base branch to search for modified packages. |
## Outputs
Expand Down
8 changes: 7 additions & 1 deletion get-modified-packages/action.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
name: get-modified-packages
description: ""

inputs:
base-branch:
description: ""
required: false
default: ${{ github.base_ref }}

outputs:
modified-packages:
description: ""
Expand All @@ -17,7 +23,7 @@ runs:
- name: Get modified packages
id: get-modified-packages
run: |
${GITHUB_ACTION_PATH}/get-modified-packages.sh origin/${{ github.base_ref }}
${GITHUB_ACTION_PATH}/get-modified-packages.sh origin/${{ inputs.base-branch }}
shell: bash

- name: Show result
Expand Down

0 comments on commit 855ee88

Please sign in to comment.