mirror of
https://github.com/tj-actions/changed-files
synced 2025-01-29 03:34:50 +00:00
Fixed error with test (#270)
* Fixed error with test * Update action.yml
This commit is contained in:
parent
3ef3d14e6d
commit
66714ebcad
2 changed files with 14 additions and 10 deletions
22
.github/workflows/test.yml
vendored
22
.github/workflows/test.yml
vendored
|
@ -434,15 +434,6 @@ jobs:
|
|||
echo '${{ toJSON(steps.changed-files-custom-sha.outputs) }}'
|
||||
shell:
|
||||
bash
|
||||
- name: Get branch name
|
||||
id: branch-name
|
||||
uses: tj-actions/branch-names@v5
|
||||
- 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 since_last_remote_commit set to true
|
||||
id: changed-files-since-last-remote-commit
|
||||
uses: ./
|
||||
|
@ -453,12 +444,25 @@ jobs:
|
|||
echo '${{ toJSON(steps.changed-files-since-last-remote-commit.outputs) }}'
|
||||
shell:
|
||||
bash
|
||||
- name: Get branch name
|
||||
id: branch-name
|
||||
uses: tj-actions/branch-names@v5
|
||||
if: github.event_name == 'pull_request'
|
||||
- uses: nrwl/last-successful-commit-action@v1
|
||||
id: last_successful_commit
|
||||
if: github.event_name == 'pull_request'
|
||||
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
|
||||
if: github.event_name == 'pull_request'
|
||||
id: changed-files-custom-base-sha
|
||||
uses: ./
|
||||
with:
|
||||
base_sha: ${{ steps.last_successful_commit.outputs.commit_hash }}
|
||||
- name: Show output
|
||||
if: github.event_name == 'pull_request'
|
||||
run: |
|
||||
echo '${{ toJSON(steps.changed-files-custom-base-sha.outputs) }}'
|
||||
shell:
|
||||
|
|
|
@ -98,7 +98,7 @@ runs:
|
|||
# "Set base sha..."
|
||||
if [[ -n "${{ inputs.base_sha }}" ]]; then
|
||||
echo "::set-output name=base_sha::${{ inputs.base_sha }}"
|
||||
elif [[ "${{ inputs.since_last_remote_commit }}" == "true" ]]; then
|
||||
elif [[ "${{ inputs.since_last_remote_commit }}" == "true" && "${{ github.event.base_ref }}" != "null" ]]; then
|
||||
echo "::set-output name=base_sha::${{ github.event.before }}"
|
||||
fi
|
||||
id: base-sha
|
||||
|
|
Loading…
Reference in a new issue