Fixed error with test (#270)
* Fixed error with test * Update action.yml
This commit is contained in:
parent
3ef3d14e6d
commit
66714ebcad
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) }}'
|
echo '${{ toJSON(steps.changed-files-custom-sha.outputs) }}'
|
||||||
shell:
|
shell:
|
||||||
bash
|
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
|
- name: Run changed-files with since_last_remote_commit set to true
|
||||||
id: changed-files-since-last-remote-commit
|
id: changed-files-since-last-remote-commit
|
||||||
uses: ./
|
uses: ./
|
||||||
@ -453,12 +444,25 @@ jobs:
|
|||||||
echo '${{ toJSON(steps.changed-files-since-last-remote-commit.outputs) }}'
|
echo '${{ toJSON(steps.changed-files-since-last-remote-commit.outputs) }}'
|
||||||
shell:
|
shell:
|
||||||
bash
|
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
|
- name: Run changed-files with a custom base sha
|
||||||
|
if: github.event_name == 'pull_request'
|
||||||
id: changed-files-custom-base-sha
|
id: changed-files-custom-base-sha
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
base_sha: ${{ steps.last_successful_commit.outputs.commit_hash }}
|
base_sha: ${{ steps.last_successful_commit.outputs.commit_hash }}
|
||||||
- name: Show output
|
- name: Show output
|
||||||
|
if: github.event_name == 'pull_request'
|
||||||
run: |
|
run: |
|
||||||
echo '${{ toJSON(steps.changed-files-custom-base-sha.outputs) }}'
|
echo '${{ toJSON(steps.changed-files-custom-base-sha.outputs) }}'
|
||||||
shell:
|
shell:
|
||||||
|
@ -98,7 +98,7 @@ runs:
|
|||||||
# "Set base sha..."
|
# "Set base sha..."
|
||||||
if [[ -n "${{ inputs.base_sha }}" ]]; then
|
if [[ -n "${{ inputs.base_sha }}" ]]; then
|
||||||
echo "::set-output name=base_sha::${{ inputs.base_sha }}"
|
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 }}"
|
echo "::set-output name=base_sha::${{ github.event.before }}"
|
||||||
fi
|
fi
|
||||||
id: base-sha
|
id: base-sha
|
||||||
|
Loading…
x
Reference in New Issue
Block a user