Added support for a custom base sha. (#135)

This commit is contained in:
Tonye Jack
2021-07-17 11:46:59 -04:00
committed by GitHub
parent 2096ed00f7
commit 43ddf0c457
4 changed files with 67 additions and 35 deletions

View File

@@ -129,7 +129,7 @@ jobs:
id: changed-files-specific-source-file
uses: ./
with:
files-from-source-file: |
files_from_source_file: |
test/changed-files-list.txt
test/changed-files-list.txt
files: |
@@ -152,7 +152,7 @@ jobs:
id: changed-files-specific-comma-source-file
uses: ./
with:
files-from-source-file: |
files_from_source_file: |
test/changed-files-list.txt
separator: ","
- name: Verify any_changed files comma separator
@@ -179,3 +179,22 @@ jobs:
echo "${{ toJSON(steps.changed-files-custom-sha.outputs) }}"
shell:
bash
- name: Get branch name
id: branch-name
uses: tj-actions/branch-names@v4.5
- uses: nrwl/last-successful-commit-action@v1
id: last_successful_commit
with:
branch: ${{ steps.branch-name.outputs.base_ref_branch }}
workflow_id: 'test.yml'
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Run changed-files with a custom base sha
id: changed-files-custom-base-sha
uses: ./
with:
base_sha: ${{ steps.last_successful_commit.outputs.commit_hash }}
- name: Show output
run: |
echo "${{ toJSON(steps.changed-files-custom-sha.outputs) }}"
shell:
bash