2021-03-04 21:36:52 -05:00
name : CI
on :
2021-04-23 06:14:21 -04:00
push :
branches :
2022-05-14 14:43:09 -04:00
- "**"
2023-01-01 11:39:47 -07:00
pull_request_review :
2023-06-07 17:13:00 -06:00
types : [ edited, dismissed, submitted]
2023-06-04 20:09:02 -06:00
pull_request_target :
pull_request :
2023-06-07 17:13:00 -06:00
types :
- assigned
- unassigned
- labeled
- unlabeled
- opened
- edited
- closed
- reopened
- synchronize
- converted_to_draft
- ready_for_review
- locked
- unlocked
- review_requested
- review_request_removed
- auto_merge_enabled
- auto_merge_disabled
2023-01-01 11:39:47 -07:00
branches :
- main
2021-03-04 21:36:52 -05:00
2023-06-07 17:13:00 -06:00
2021-03-04 21:36:52 -05:00
jobs :
2021-06-18 10:19:28 -04:00
shellcheck :
name : Run shellcheck
2021-05-25 00:30:19 -04:00
runs-on : ubuntu-latest
2021-06-18 10:19:28 -04:00
steps :
2023-06-16 00:17:13 -06:00
- name : Checkout branch
2023-09-08 12:31:25 -06:00
uses : actions/checkout@v4
2021-06-18 10:19:28 -04:00
- name : shellcheck
2023-09-06 23:24:26 +00:00
uses : reviewdog/action-shellcheck@v1.19
2022-05-14 14:43:09 -04:00
2023-05-25 12:22:24 -06:00
build :
runs-on : ubuntu-latest
2023-08-21 21:11:59 -06:00
outputs :
files_changed : ${{ steps.changed_files.outputs.files_changed }}
2023-05-25 12:22:24 -06:00
steps :
2023-09-08 12:31:25 -06:00
- uses : actions/checkout@v4
2023-05-25 12:22:24 -06:00
with :
persist-credentials : false
fetch-depth : 0
2023-06-08 05:11:10 -06:00
repository : ${{ github.event.pull_request.head.repo.full_name }}
2023-05-25 12:22:24 -06:00
2023-09-04 15:29:37 -06:00
- name : Use Node.js 20.x
2023-10-23 17:20:57 +00:00
uses : actions/setup-node@v4.0.0
2023-05-25 12:22:24 -06:00
with :
cache : 'yarn'
2023-09-04 15:29:37 -06:00
node-version : '20.x'
2023-05-25 12:22:24 -06:00
- name : Create coverage directory and clover.xml
run : |
mkdir -p coverage
touch coverage/clover.xml
- name : Install dependencies
run : |
yarn install
- name : Run eslint on changed files
2023-09-06 04:39:25 +00:00
uses : tj-actions/eslint-changed-files@v21
2023-06-15 12:33:00 -06:00
if : github.event_name == 'pull_request'
2023-05-25 12:22:24 -06:00
with :
token : ${{ secrets.PAT_TOKEN }}
config_path : ".eslintrc.json"
ignore_path : ".eslintignore"
- name : Run build and test
run : |
yarn all
- name : Verify Changed files
2023-06-22 09:55:39 +00:00
uses : tj-actions/verify-changed-files@v16
2023-05-25 12:22:24 -06:00
id : changed_files
with :
files : |
src
dist
- name : Commit files
2023-06-15 12:33:00 -06:00
if : steps.changed_files.outputs.files_changed == 'true' && github.event_name == 'pull_request'
2023-05-25 12:22:24 -06:00
run : |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add src dist
git commit -m "Added missing changes and modified dist assets."
- name : Push changes
2023-05-25 17:39:26 -06:00
if : steps.changed_files.outputs.files_changed == 'true' && github.event_name == 'pull_request'
2023-06-07 19:05:54 -06:00
continue-on-error : true
2023-05-25 12:22:24 -06:00
uses : ad-m/github-push-action@master
with :
github_token : ${{ secrets.PAT_TOKEN }}
branch : ${{ github.head_ref }}
- name : Upload build assets
uses : actions/upload-artifact@v3
with :
name : build-assets
path : dist
- name : Run codacy-coverage-reporter
uses : codacy/codacy-coverage-reporter-action@v1
continue-on-error : true
with :
project-token : ${{ secrets.CODACY_PROJECT_TOKEN }}
coverage-reports : coverage/lcov.info
2021-08-28 04:53:03 +03:00
test-multiple-repositories :
name : Test with multiple repositories
2023-03-09 21:01:01 -07:00
runs-on : ubuntu-latest
2023-05-25 12:22:24 -06:00
needs : build
2023-08-21 21:11:59 -06:00
if : needs.build.outputs.files_changed != 'true'
2021-08-28 04:53:03 +03:00
steps :
- name : Checkout into dir1
2023-09-08 12:31:25 -06:00
uses : actions/checkout@v4
2021-08-28 04:53:03 +03:00
with :
2023-06-08 06:25:07 -06:00
repository : ${{ github.event.pull_request.head.repo.full_name }}
2022-02-23 10:39:20 +02:00
submodules : true
2021-08-28 04:53:03 +03:00
fetch-depth : 0
path : dir1
2023-05-25 12:22:24 -06:00
- name : Download build assets
uses : actions/download-artifact@v3
with :
name : build-assets
2023-06-23 11:20:13 -06:00
path : dir1/dist
2023-05-25 12:22:24 -06:00
2021-08-28 04:53:03 +03:00
- name : Run changed-files with defaults on the dir1
id : changed-files-dir1
uses : ./dir1
with :
path : dir1
2023-05-25 12:22:24 -06:00
2021-08-28 04:53:03 +03:00
- name : Show output
run : |
2021-09-04 09:08:20 -04:00
echo '${{ toJSON(steps.changed-files-dir1.outputs) }}'
2021-08-28 04:53:03 +03:00
shell :
bash
2023-05-25 12:22:24 -06:00
2021-08-28 04:53:03 +03:00
- name : List all modified files
run : |
2021-10-12 09:47:12 -04:00
for file in ${{ steps.changed-files-dir1.outputs.modified_files }}; do
2021-09-04 09:08:20 -04:00
echo "$file"
2021-08-28 04:53:03 +03:00
done
shell :
bash
2023-05-25 12:22:24 -06:00
2023-06-23 11:20:13 -06:00
- name : Download build assets
uses : actions/download-artifact@v3
with :
name : build-assets
path : dir2/dist
2021-08-28 04:53:03 +03:00
- name : Checkout into dir2
2023-09-08 12:31:25 -06:00
uses : actions/checkout@v4
2021-08-28 04:53:03 +03:00
with :
2023-06-08 06:25:07 -06:00
repository : ${{ github.event.pull_request.head.repo.full_name }}
2022-02-23 10:39:20 +02:00
submodules : true
2021-08-28 04:53:03 +03:00
fetch-depth : 0
path : dir2
2023-05-25 12:22:24 -06:00
2021-08-28 04:53:03 +03:00
- name : Run changed-files with defaults on the dir2
id : changed-files-dir2
uses : ./dir2
with :
path : dir2
2023-05-25 12:22:24 -06:00
2021-08-28 04:53:03 +03:00
- name : Show output
run : |
2021-09-04 09:08:20 -04:00
echo '${{ toJSON(steps.changed-files-dir2.outputs) }}'
2021-08-28 04:53:03 +03:00
shell :
bash
2023-05-25 12:22:24 -06:00
2021-08-28 04:53:03 +03:00
- name : List all modified files
run : |
2021-10-12 09:47:12 -04:00
for file in ${{ steps.changed-files-dir2.outputs.modified_files }}; do
2021-09-04 09:08:20 -04:00
echo "$file"
2021-08-28 04:53:03 +03:00
done
shell :
bash
2022-10-15 12:34:47 -06:00
test-using-since-and-until :
name : Test changed-files using since and until
2023-05-25 12:22:24 -06:00
needs : build
2023-03-09 21:01:01 -07:00
runs-on : ubuntu-latest
2023-08-21 21:11:59 -06:00
if : github.event_name == 'push' && needs.build.outputs.files_changed != 'true'
2022-10-15 12:34:47 -06:00
steps :
2023-06-16 00:17:13 -06:00
- name : Checkout branch
2023-09-08 12:31:25 -06:00
uses : actions/checkout@v4
2022-10-15 12:34:47 -06:00
with :
2023-06-08 06:25:07 -06:00
repository : ${{ github.event.pull_request.head.repo.full_name }}
2022-10-15 12:34:47 -06:00
fetch-depth : 0
2022-10-25 14:12:36 -06:00
2023-05-25 12:22:24 -06:00
- name : Download build assets
uses : actions/download-artifact@v3
with :
name : build-assets
2022-10-15 12:34:47 -06:00
- name : Run changed-files since 2022-08-19
id : changed-files-since
uses : ./
with :
since : "2022-08-19"
2022-10-15 22:13:00 -06:00
- name : Check output
if : "!contains(steps.changed-files-since.outputs.all_changed_files, '.github/workflows/sync-release-version.yml')"
run : |
echo "Invalid output: Expected to include (.github/workflows/sync-release-version.yml) got (${{ steps.changed-files-since.outputs.all_changed_files }})"
exit 1
shell :
bash
2022-10-25 14:12:36 -06:00
2022-10-15 12:34:47 -06:00
- name : Show output
run : |
echo '${{ toJSON(steps.changed-files-since.outputs) }}'
shell :
bash
2022-10-25 14:12:36 -06:00
2022-10-15 12:34:47 -06:00
- name : Run changed-files until 2022-08-20
id : changed-files-until
uses : ./
with :
until : "2022-08-20"
2022-10-15 22:13:00 -06:00
- name : Check output
2022-11-08 09:31:21 -07:00
if : "!contains(steps.changed-files-until.outputs.all_changed_files, 'README.md')"
2022-10-15 22:13:00 -06:00
run : |
2022-11-08 09:31:21 -07:00
echo "Invalid output: Expected to include (README.md) got (${{ steps.changed-files-until.outputs.all_changed_files }})"
2022-10-15 22:13:00 -06:00
exit 1
shell :
bash
2022-10-15 12:34:47 -06:00
- name : Show output
run : |
echo '${{ toJSON(steps.changed-files-until.outputs) }}'
shell :
bash
2022-07-18 16:34:41 -04:00
test-similar-base-and-commit-sha :
name : Test changed-files similar base and commit sha
2023-03-09 21:01:01 -07:00
runs-on : ubuntu-latest
2023-05-25 12:22:24 -06:00
needs : build
2023-08-21 21:11:59 -06:00
if : needs.build.outputs.files_changed != 'true'
2022-07-18 16:34:41 -04:00
2022-09-02 18:32:08 -06:00
steps :
2023-06-16 00:17:13 -06:00
- name : Checkout branch
2023-09-08 12:31:25 -06:00
uses : actions/checkout@v4
2022-09-02 18:32:08 -06:00
with :
2023-06-08 06:25:07 -06:00
repository : ${{ github.event.pull_request.head.repo.full_name }}
2022-09-02 18:32:08 -06:00
fetch-depth : 0
2023-05-25 12:22:24 -06:00
- name : Download build assets
uses : actions/download-artifact@v3
with :
name : build-assets
2022-09-02 18:55:23 -06:00
- name : Run changed-files with similar base and commit sha
2022-09-02 18:32:08 -06:00
id : changed-files
2022-09-02 18:50:38 -06:00
continue-on-error : true
2022-09-02 18:32:08 -06:00
uses : ./
with :
base_sha : d1c0ee4
sha : d1c0ee4
2022-09-02 18:50:38 -06:00
- name : Exit with 1 if no error is raised
if : steps.changed-files.outcome != 'failure'
run : |
echo "Expected: (failure) got ${{ steps.changed-files.outcome }}"
exit 1
2022-09-02 18:32:08 -06:00
- name : Show output
run : |
echo '${{ toJSON(steps.changed-files.outputs) }}'
shell :
bash
2022-10-14 13:04:29 -06:00
test-unset-github-output-env :
name : Test unset GITHUB_OUTPUT env
2023-03-09 21:01:01 -07:00
runs-on : ubuntu-latest
2023-05-25 12:22:24 -06:00
needs : build
2023-08-21 21:11:59 -06:00
if : needs.build.outputs.files_changed != 'true'
2022-10-14 13:04:29 -06:00
steps :
2023-06-16 00:17:13 -06:00
- name : Checkout branch
2023-09-08 12:31:25 -06:00
uses : actions/checkout@v4
2022-10-14 13:04:29 -06:00
with :
2023-06-08 06:25:07 -06:00
repository : ${{ github.event.pull_request.head.repo.full_name }}
2022-10-14 13:04:29 -06:00
fetch-depth : 0
2023-05-25 12:22:24 -06:00
- name : Download build assets
uses : actions/download-artifact@v3
with :
name : build-assets
2022-10-14 13:04:29 -06:00
- name : Run changed-files with unset GITHUB_OUTPUT env
id : changed-files
continue-on-error : true
uses : ./
env :
GITHUB_OUTPUT : ""
- name : Show output
run : |
echo '${{ toJSON(steps.changed-files.outputs) }}'
shell :
bash
2022-10-25 15:00:08 -06:00
test-limited-commit-history :
2022-10-25 15:00:32 -06:00
name : Test changed-files with limited commit history
2023-03-09 21:01:01 -07:00
runs-on : ubuntu-latest
2023-05-25 12:22:24 -06:00
needs : build
2023-08-21 21:11:59 -06:00
if : needs.build.outputs.files_changed != 'true'
2022-09-02 18:32:08 -06:00
strategy :
fail-fast : false
max-parallel : 4
matrix :
2023-07-12 07:09:45 -06:00
fetch-depth : [ 1 , 2 , 50 ]
input-fetch_depth : [ 1 , 2 , 50 ]
2022-09-02 18:32:08 -06:00
2022-07-18 16:34:41 -04:00
steps :
2023-06-16 00:17:13 -06:00
- name : Checkout branch
2023-09-08 12:31:25 -06:00
uses : actions/checkout@v4
2022-11-03 06:26:40 -06:00
with :
2023-06-08 06:25:07 -06:00
repository : ${{ github.event.pull_request.head.repo.full_name }}
2022-11-03 09:54:28 -06:00
fetch-depth : ${{ matrix.fetch-depth }}
2022-07-18 16:34:41 -04:00
2023-05-25 12:22:24 -06:00
- name : Download build assets
uses : actions/download-artifact@v3
with :
name : build-assets
2022-11-03 06:26:40 -06:00
- name : Run changed-files
2022-07-18 16:34:41 -04:00
id : changed-files
uses : ./
2023-07-12 07:09:45 -06:00
continue-on-error : ${{ matrix.input-skip_initial_fetch == true && matrix.fetch-depth < 10 }}
2023-02-06 18:25:06 -07:00
with :
fetch_depth : ${{ matrix.input-fetch_depth }}
2023-07-12 07:09:45 -06:00
skip_initial_fetch : ${{ github.event_name == 'push' }}
2022-10-12 12:57:13 -06:00
2022-07-18 16:34:41 -04:00
- name : Show output
run : |
echo '${{ toJSON(steps.changed-files.outputs) }}'
shell :
bash
2023-05-31 15:26:08 -06:00
test-pull-request-head-ref :
name : Test changed-files with pull request head ref
runs-on : ubuntu-latest
needs : build
2023-08-21 21:11:59 -06:00
if : github.event_name != 'push' && needs.build.outputs.files_changed != 'true'
2023-05-31 15:26:08 -06:00
steps :
2023-06-16 00:17:13 -06:00
- name : Checkout branch
2023-09-08 12:31:25 -06:00
uses : actions/checkout@v4
2023-05-31 15:26:08 -06:00
with :
ref : ${{ github.event.pull_request.head.sha }}
- name : Download build assets
uses : actions/download-artifact@v3
with :
name : build-assets
- name : Run changed-files
id : changed-files
uses : ./
- name : Show output
run : |
echo '${{ toJSON(steps.changed-files.outputs) }}'
shell :
bash
2023-06-01 10:03:09 -06:00
test-pull-request-without-persist-credentials :
name : Test changed-files with pull request without persist credentials
runs-on : ubuntu-latest
needs : build
2023-08-21 21:11:59 -06:00
if : github.event_name != 'push' && needs.build.outputs.files_changed != 'true'
2023-06-01 10:03:09 -06:00
strategy :
fail-fast : false
max-parallel : 4
matrix :
fetch-depth : [ 1 , 2 , 0 ]
steps :
2023-06-16 00:17:13 -06:00
- name : Checkout branch
2023-09-08 12:31:25 -06:00
uses : actions/checkout@v4
2023-06-01 10:03:09 -06:00
with :
fetch-depth : ${{ matrix.fetch-depth }}
persist-credentials : false
2023-06-08 06:25:07 -06:00
repository : ${{ github.event.pull_request.head.repo.full_name }}
2023-06-01 10:03:09 -06:00
- name : Download build assets
uses : actions/download-artifact@v3
with :
name : build-assets
- name : Run changed-files
id : changed-files
uses : ./
- name : Show output
run : |
echo '${{ toJSON(steps.changed-files.outputs) }}'
shell :
bash
2021-12-04 06:11:27 -05:00
test-non-existent-base-sha :
name : Test changed-files non existent base sha
2023-03-09 21:01:01 -07:00
runs-on : ubuntu-latest
2023-05-25 12:22:24 -06:00
needs : build
2023-08-21 21:11:59 -06:00
if : needs.build.outputs.files_changed != 'true'
2021-06-18 10:19:28 -04:00
2021-05-25 00:30:19 -04:00
steps :
2023-06-16 00:17:13 -06:00
- name : Checkout branch
2023-09-08 12:31:25 -06:00
uses : actions/checkout@v4
2021-08-28 04:53:03 +03:00
2023-05-25 12:22:24 -06:00
- name : Download build assets
uses : actions/download-artifact@v3
with :
name : build-assets
2021-12-04 06:11:27 -05:00
- name : Run changed-files with non existent base sha
2021-05-25 00:30:19 -04:00
id : changed-files
2021-12-04 06:11:27 -05:00
uses : ./
2021-05-25 00:30:19 -04:00
continue-on-error : true
2021-12-04 06:11:27 -05:00
with :
base_sha : "4554456"
- name : Show output
run : |
echo "${{ toJSON(steps.changed-files.outputs) }}"
shell :
bash
2022-08-20 20:41:36 -06:00
2022-06-29 22:42:32 -04:00
- name : Exit with 1 if no error is raised
if : steps.changed-files.outcome != 'failure'
run : |
echo "Expected: (failure) got ${{ steps.changed-files.outcome }}"
exit 1
2022-05-14 14:43:09 -04:00
2021-12-04 06:11:27 -05:00
- name : Run changed-files-specific with non existent base sha
id : changed-files-specific
2021-05-25 00:30:19 -04:00
uses : ./
2021-12-04 06:11:27 -05:00
continue-on-error : true
with :
files : action.yml
base_sha : "4554456"
- name : Show output
run : |
echo "${{ toJSON(steps.changed-files-specific.outputs) }}"
shell :
bash
2022-08-20 20:41:36 -06:00
2022-06-29 22:42:32 -04:00
- name : Exit with 1 if no error is raised
if : steps.changed-files-specific.outcome != 'failure'
run : |
echo "Expected: (failure) got ${{ steps.changed-files-specific.outcome }}"
exit 1
2021-12-04 06:11:27 -05:00
test-non-existent-sha :
name : Test changed-files non existent sha
2023-03-09 21:01:01 -07:00
runs-on : ubuntu-latest
2023-05-25 12:22:24 -06:00
needs : build
2023-08-21 21:11:59 -06:00
if : needs.build.outputs.files_changed != 'true'
2021-12-04 06:11:27 -05:00
steps :
2023-06-16 00:17:13 -06:00
- name : Checkout branch
2023-09-08 12:31:25 -06:00
uses : actions/checkout@v4
2021-12-04 06:11:27 -05:00
2023-05-25 12:22:24 -06:00
- name : Download build assets
uses : actions/download-artifact@v3
with :
name : build-assets
2021-12-04 06:11:27 -05:00
- name : Run changed-files with non existent sha
id : changed-files
uses : ./
continue-on-error : true
with :
2022-11-11 08:21:05 -07:00
sha : "4774456"
2021-08-28 04:53:03 +03:00
2021-05-25 00:30:19 -04:00
- name : Show output
run : |
echo "${{ toJSON(steps.changed-files.outputs) }}"
2021-06-18 10:19:28 -04:00
shell :
bash
2022-08-20 20:41:36 -06:00
2022-06-29 22:42:32 -04:00
- name : Exit with 1 if no error is raised
if : steps.changed-files.outcome != 'failure'
run : |
echo "Expected: (failure) got ${{ steps.changed-files.outcome }}"
exit 1
2022-05-14 14:43:09 -04:00
2021-12-04 06:11:27 -05:00
- name : Run changed-files-specific with non existent sha
id : changed-files-specific
uses : ./
continue-on-error : true
with :
files : action.yml
2022-11-11 08:21:05 -07:00
sha : "4774456"
2021-12-04 06:11:27 -05:00
- name : Show output
run : |
echo "${{ toJSON(steps.changed-files-specific.outputs) }}"
shell :
bash
2022-08-20 20:41:36 -06:00
2022-06-29 22:42:32 -04:00
- name : Exit with 1 if no error is raised
if : steps.changed-files-specific.outcome != 'failure'
run : |
echo "Expected: (failure) got ${{ steps.changed-files-specific.outcome }}"
exit 1
2021-05-25 00:30:19 -04:00
2023-06-23 11:20:13 -06:00
test-rest-api :
name : Test changed-files with REST API
runs-on : ubuntu-latest
needs : build
2023-08-21 21:11:59 -06:00
if : github.event_name != 'push' && needs.build.outputs.files_changed != 'true'
2023-06-23 11:20:13 -06:00
permissions :
pull-requests : read
steps :
- name : Checkout into dir1
2023-09-08 12:31:25 -06:00
uses : actions/checkout@v4
2023-06-23 11:20:13 -06:00
with :
repository : ${{ github.event.pull_request.head.repo.full_name }}
submodules : true
fetch-depth : 0
path : dir1
- name : Download build assets
uses : actions/download-artifact@v3
with :
name : build-assets
path : dir1/dist
- name : Run changed-files with REST API
id : changed-files
uses : ./dir1
- name : Show output
run : |
echo '${{ toJSON(steps.changed-files.outputs) }}'
shell :
bash
2023-02-15 21:42:55 -07:00
test-submodules :
name : Test changed-files with submodule
2023-03-09 21:01:01 -07:00
runs-on : ubuntu-latest
2023-05-25 12:22:24 -06:00
needs : build
2023-08-21 21:11:59 -06:00
if : needs.build.outputs.files_changed != 'true'
2023-02-15 21:42:55 -07:00
strategy :
fail-fast : false
max-parallel : 4
matrix :
2023-03-09 21:01:01 -07:00
fetch-depth : [ 0 , 1 , 2 ]
2023-02-15 21:42:55 -07:00
steps :
2023-06-16 00:17:13 -06:00
- name : Checkout branch
2023-09-08 12:31:25 -06:00
uses : actions/checkout@v4
2023-02-15 21:42:55 -07:00
with :
2023-02-28 12:47:37 -07:00
ref : ${{ github.event.pull_request.head.sha || github.sha }}
2023-02-15 21:42:55 -07:00
submodules : recursive
2023-02-28 12:47:37 -07:00
fetch-depth : ${{ matrix.fetch-depth }}
2023-02-15 21:42:55 -07:00
2023-05-25 12:22:24 -06:00
- name : Download build assets
uses : actions/download-artifact@v3
with :
name : build-assets
2023-02-15 21:42:55 -07:00
- name : Run changed-files with submodule
id : changed-files
uses : ./
with :
base_sha : "85bd869"
sha : "adde7bb"
fetch_depth : 60000
- name : Verify added files
if : steps.changed-files.outputs.added_files != 'test/demo/test/test.txt'
run : |
echo "Expected: (test/demo/test/test.txt) got ${{ steps.changed-files.outputs.added_files }}"
exit 1
- name : Show output
run : |
echo "${{ toJSON(steps.changed-files.outputs) }}"
shell :
bash
2023-06-16 00:17:13 -06:00
test-yaml :
name : Test changed-files with yaml
runs-on : ubuntu-latest
needs : build
2023-08-21 21:11:59 -06:00
if : needs.build.outputs.files_changed != 'true'
2023-06-16 00:17:13 -06:00
strategy :
fail-fast : false
max-parallel : 4
matrix :
fetch-depth : [ 0 , 1 , 2 ]
steps :
- name : Checkout branch
2023-09-08 12:31:25 -06:00
uses : actions/checkout@v4
2023-06-16 00:17:13 -06:00
with :
ref : ${{ github.event.pull_request.head.sha || github.sha }}
submodules : recursive
fetch-depth : ${{ matrix.fetch-depth }}
- name : Download build assets
uses : actions/download-artifact@v3
with :
name : build-assets
- name : Run changed-files with files_yaml
id : changed-files
uses : ./
with :
files_yaml : |
test :
- test/**.txt
- test/**.md
- name : Show output
run : |
echo "${{ toJSON(steps.changed-files.outputs) }}"
shell :
bash
- name : Run changed-files with files_yaml_from_source_file
id : changed-files-from-source-file
uses : ./
with :
files_yaml_from_source_file : |
test/changed-files.yml
- name : Show output
run : |
echo "${{ toJSON(steps.changed-files-from-source-file.outputs) }}"
shell :
bash
2023-02-15 21:42:55 -07:00
2023-07-12 07:09:45 -06:00
test-recover-deleted-file :
2023-06-16 18:57:12 -06:00
name : Test changed-files recover deleted file
runs-on : ubuntu-latest
needs : build
2023-08-21 21:11:59 -06:00
if : needs.build.outputs.files_changed != 'true'
2023-06-16 18:57:12 -06:00
strategy :
fail-fast : false
max-parallel : 4
matrix :
fetch-depth : [ 0 , 1 , 2 ]
steps :
- name : Checkout branch
2023-09-08 12:31:25 -06:00
uses : actions/checkout@v4
2023-06-16 18:57:12 -06:00
with :
ref : ${{ github.event.pull_request.head.sha || github.sha }}
submodules : recursive
fetch-depth : ${{ matrix.fetch-depth }}
- name : Download build assets
uses : actions/download-artifact@v3
with :
name : build-assets
- name : Run changed-files with recover_deleted_files
id : changed-files-recover-deleted-files
uses : ./
with :
base_sha : "fcdeb5b3d797752d95f6dbe98552a95c29dad338"
sha : "432e0c810c60ef1332850a971c5ec39022034b4c"
recover_deleted_files : true
2023-06-26 18:27:09 -06:00
fetch_depth : 60000
2023-06-16 18:57:12 -06:00
- name : Show output
run : |
echo "${{ toJSON(steps.changed-files-recover-deleted-files.outputs) }}"
shell :
bash
- name : Verify deleted files
if : steps.changed-files-recover-deleted-files.outputs.deleted_files != 'test/test deleted.txt'
run : |
echo "Expected: (test/test deleted.txt) got ${{ steps.changed-files-recover-deleted-files.outputs.deleted_files }}"
exit 1
- name : Verify that test/test deleted.txt is restored
run : |
if [ ! -f "test/test deleted.txt" ]; then
echo "Expected: (test/test deleted.txt) to exist"
exit 1
else
cat "test/test deleted.txt"
2023-06-16 20:33:42 -06:00
rm "test/test deleted.txt"
fi
- name : Run changed-files with recover_deleted_files and files input
id : changed-files-recover-deleted-files-with-files
uses : ./
with :
base_sha : "fcdeb5b3d797752d95f6dbe98552a95c29dad338"
sha : "432e0c810c60ef1332850a971c5ec39022034b4c"
files : |
2023-10-25 21:25:02 -06:00
test/**
2023-06-16 20:33:42 -06:00
recover_deleted_files : true
2023-06-26 18:27:09 -06:00
fetch_depth : 60000
2023-06-16 20:33:42 -06:00
- name : Show output
run : |
echo "${{ toJSON(steps.changed-files-recover-deleted-files-with-files.outputs) }}"
shell :
bash
- name : Verify deleted files
if : steps.changed-files-recover-deleted-files-with-files.outputs.deleted_files != 'test/test deleted.txt'
run : |
echo "Expected: (test/test deleted.txt) got ${{ steps.changed-files-recover-deleted-files-with-files.outputs.deleted_files }}"
exit 1
- name : Verify that test/test deleted.txt is restored
run : |
if [ ! -f "test/test deleted.txt" ]; then
echo "Expected: (test/test deleted.txt) to exist"
exit 1
else
cat "test/test deleted.txt"
rm "test/test deleted.txt"
fi
- name : Run changed-files with recover_deleted_files and files_yaml input
id : changed-files-recover-deleted-files-with-files-yaml
uses : ./
with :
base_sha : "fcdeb5b3d797752d95f6dbe98552a95c29dad338"
sha : "432e0c810c60ef1332850a971c5ec39022034b4c"
files_yaml : |
test :
- test/**.txt
- test/**.md
recover_deleted_files : true
2023-06-26 18:27:09 -06:00
fetch_depth : 60000
2023-06-16 20:33:42 -06:00
- name : Show output
run : |
echo "${{ toJSON(steps.changed-files-recover-deleted-files-with-files-yaml.outputs) }}"
shell :
bash
- name : Verify deleted files
if : steps.changed-files-recover-deleted-files-with-files-yaml.outputs.test_deleted_files != 'test/test deleted.txt'
run : |
echo "Expected: (test/test deleted.txt) got ${{ steps.changed-files-recover-deleted-files-with-files-yaml.outputs.test_deleted_files }}"
exit 1
2023-09-18 14:17:46 -06:00
- name : Verify that the modified_keys is correct
if : "!contains(steps.changed-files-recover-deleted-files-with-files-yaml.outputs.modified_keys, 'test')"
run : |
echo "Expected: (test) got ${{ steps.changed-files-recover-deleted-files-with-files-yaml.outputs.modified_keys }}"
exit 1
2023-06-16 20:33:42 -06:00
- name : Verify that test/test deleted.txt is restored
run : |
if [ ! -f "test/test deleted.txt" ]; then
echo "Expected: (test/test deleted.txt) to exist"
exit 1
else
cat "test/test deleted.txt"
rm "test/test deleted.txt"
2023-06-16 18:57:12 -06:00
fi
- name : Run changed-files with recover_deleted_files and recover_deleted_files_to_destination
id : changed-files-recover-deleted-files-to-destination
uses : ./
with :
base_sha : "fcdeb5b3d797752d95f6dbe98552a95c29dad338"
sha : "432e0c810c60ef1332850a971c5ec39022034b4c"
recover_deleted_files : true
recover_deleted_files_to_destination : "deleted_files"
2023-06-26 18:27:09 -06:00
fetch_depth : 60000
2023-06-16 18:57:12 -06:00
- name : Show output
run : |
echo "${{ toJSON(steps.changed-files-recover-deleted-files-to-destination.outputs) }}"
shell :
bash
- name : Verify deleted files
if : steps.changed-files-recover-deleted-files-to-destination.outputs.deleted_files != 'test/test deleted.txt'
run : |
echo "Expected: (test/test deleted.txt) got ${{ steps.changed-files-recover-deleted-files-to-destination.outputs.deleted_files }}"
exit 1
- name : Verify that test/test deleted.txt is restored
run : |
if [ ! -f "deleted_files/test/test deleted.txt" ]; then
echo "Expected: (deleted_files/test/test deleted.txt) to exist"
exit 1
else
cat "deleted_files/test/test deleted.txt"
fi
2023-09-22 12:52:14 -06:00
test-dir-names-deleted-files-include-only-deleted-dirs-single-file :
name : Test dir names deleted files include only deleted dirs single file
runs-on : ubuntu-latest
needs : build
if : needs.build.outputs.files_changed != 'true'
steps :
- name : Checkout branch
uses : actions/checkout@v4
with :
2023-09-22 12:59:02 -06:00
ref : a52f8621d26d5d9f54b80f74bda2d9eedff94693
2023-09-22 12:52:14 -06:00
repository : ${{ github.event.pull_request.head.repo.full_name }}
submodules : true
2023-09-22 12:59:02 -06:00
fetch-depth : 2
2023-09-22 12:52:14 -06:00
- name : Run changed-files with dir_names and dir_names_deleted_files_include_only_deleted_dirs with a single file deleted withing the test directory
id : changed-files-dir-names-deleted-files-include-only-deleted-dirs-single-file
uses : ./
with :
2023-09-22 12:59:02 -06:00
base_sha : 920856cfdd4b4be17810e34b197596397473adf6
sha : a52f8621d26d5d9f54b80f74bda2d9eedff94693
2023-09-22 12:52:14 -06:00
dir_names : true
dir_names_deleted_files_include_only_deleted_dirs : true
- name : Show output
run : |
echo '${{ toJSON(steps.changed-files-dir-names-deleted-files-include-only-deleted-dirs-single-file.outputs) }}'
shell :
bash
- name : Check deleted_files output
if : steps.changed-files-dir-names-deleted-files-include-only-deleted-dirs-single-file.outputs.deleted_files != ''
run : |
echo "Invalid output: Expected '' got (${{ steps.changed-files-dir-names-deleted-files-include-only-deleted-dirs-single-file.outputs.deleted_files }})"
exit 1
shell :
bash
test-dir-names-deleted-files-include-only-deleted-dirs-directory :
name : Test dir names deleted files include only deleted dirs
runs-on : ubuntu-latest
needs : build
if : needs.build.outputs.files_changed != 'true'
steps :
- name : Checkout branch
uses : actions/checkout@v4
with :
2023-09-22 12:59:02 -06:00
ref : cd1e384723e4d1a184568182ac2b27c53ebf017f
2023-09-22 12:52:14 -06:00
repository : ${{ github.event.pull_request.head.repo.full_name }}
submodules : true
2023-09-22 12:59:02 -06:00
fetch-depth : 2
2023-09-22 12:52:14 -06:00
- name : Run changed-files with dir_names and dir_names_deleted_files_include_only_deleted_dirs with the test directory deleted
id : changed-files-dir-names-deleted-files-include-only-deleted-dirs-directory
uses : ./
with :
2023-09-22 12:59:02 -06:00
base_sha : a52f8621d26d5d9f54b80f74bda2d9eedff94693
sha : cd1e384723e4d1a184568182ac2b27c53ebf017f
2023-09-22 12:52:14 -06:00
dir_names : true
dir_names_deleted_files_include_only_deleted_dirs : true
- name : Show output
run : |
echo '${{ toJSON(steps.changed-files-dir-names-deleted-files-include-only-deleted-dirs-directory.outputs) }}'
shell :
bash
- name : Check deleted_files output on non windows platform
if : steps.changed-files-dir-names-deleted-files-include-only-deleted-dirs-directory.outputs.deleted_files != 'test/test3' && runner.os != 'Windows'
run : |
echo "Invalid output: Expected (test/test3) got (${{ steps.changed-files-dir-names-deleted-files-include-only-deleted-dirs-directory.outputs.deleted_files }})"
exit 1
shell :
bash
- name : Check deleted_files output on windows platform
if : "!contains(steps.changed-files-dir-names-deleted-files-include-only-deleted-dirs-directory.outputs.deleted_files, 'test\\test3') && runner.os == 'Windows'"
run : |
echo "Invalid output: Expected (test\\test3) got (${{ steps.changed-files-dir-names-deleted-files-include-only-deleted-dirs-directory.outputs.deleted_files }})"
exit 1
shell :
bash
2023-09-08 12:31:25 -06:00
test-since-last-remote-commit :
name : Test changed-files since last remote commit
runs-on : ubuntu-latest
needs : build
if : needs.build.outputs.files_changed != 'true'
strategy :
fail-fast : false
max-parallel : 4
matrix :
fetch-depth : [ 0 , 1 , 2 ]
steps :
- name : Checkout branch
uses : actions/checkout@v4
with :
ref : ${{ github.event.pull_request.head.sha }}
repository : ${{ github.event.pull_request.head.repo.full_name }}
submodules : true
fetch-depth : ${{ matrix.fetch-depth }}
- name : Download build assets
uses : actions/download-artifact@v3
with :
name : build-assets
- name : Run changed-files with since_last_remote_commit
id : changed-files-since-last-remote-commit
continue-on-error : true
uses : ./
with :
since_last_remote_commit : true
- name : Verify failed
2023-09-19 14:21:54 -06:00
if : steps.changed-files-since-last-remote-commit.outcome != 'failure' && matrix.fetch-depth == 1 && github.event.action == 'closed' && github.event_name == 'pull_request'
2023-09-08 12:31:25 -06:00
run : |
echo "Expected: (failure) got ${{ steps.changed-files-since-last-remote-commit.outcome }}"
exit 1
- name : Verify succeeded
if : steps.changed-files-since-last-remote-commit.outcome != 'success' && matrix.fetch-depth != 1
run : |
echo "Expected: (success) got ${{ steps.changed-files-since-last-remote-commit.outcome }}"
exit 1
- name : Show output
run : |
echo '${{ toJSON(steps.changed-files-since-last-remote-commit.outputs) }}'
shell :
bash
2023-06-16 18:57:12 -06:00
2021-03-04 21:36:52 -05:00
test :
name : Test changed-files
2021-06-18 10:19:28 -04:00
runs-on : ${{ matrix.platform }}
2023-05-25 12:22:24 -06:00
needs : build
2023-08-21 21:11:59 -06:00
if : needs.build.outputs.files_changed != 'true'
2021-06-18 10:19:28 -04:00
strategy :
fail-fast : false
2022-03-16 01:38:55 -04:00
max-parallel : 4
2021-06-18 10:19:28 -04:00
matrix :
2023-08-22 22:06:23 -06:00
platform : [ ubuntu-latest, macos-latest, windows-latest]
2023-03-09 21:01:01 -07:00
fetch-depth : [ 0 , 1 , 2 ]
2021-06-18 10:19:28 -04:00
2021-03-04 21:36:52 -05:00
steps :
- name : Checkout
2023-09-08 12:31:25 -06:00
uses : actions/checkout@v4
2021-04-23 06:17:20 -04:00
with :
2022-02-23 10:39:20 +02:00
submodules : true
2023-06-08 06:25:07 -06:00
repository : ${{ github.event.pull_request.head.repo.full_name }}
2022-11-02 15:09:50 -06:00
fetch-depth : ${{ matrix.fetch-depth }}
2023-05-25 12:22:24 -06:00
- name : Download build assets
uses : actions/download-artifact@v3
with :
name : build-assets
2022-10-02 06:07:58 -06:00
- name : Dump GitHub context
env :
GITHUB_CONTEXT : ${{ toJson(github) }}
run : echo "$GITHUB_CONTEXT"
2021-03-05 07:28:53 -05:00
- name : Run changed-files with defaults
2021-03-04 22:36:52 -05:00
id : changed-files
2021-03-04 21:36:52 -05:00
uses : ./
2021-03-04 22:36:52 -05:00
- name : Show output
run : |
2021-09-04 09:08:20 -04:00
echo '${{ toJSON(steps.changed-files.outputs) }}'
2021-06-18 10:19:28 -04:00
shell :
bash
2023-05-29 10:12:36 -06:00
- name : Run changed-files with dir name
id : changed-files-dir-name
uses : ./
with :
files : .github/workflows
- name : Show output
run : |
echo '${{ toJSON(steps.changed-files-dir-name.outputs) }}'
shell :
bash
2022-12-19 10:51:22 -07:00
- name : Run changed-files with write_output_files
id : changed-files-write-output-files
uses : ./
with :
json : true
write_output_files : true
- name : Show output
run : |
echo '${{ toJSON(steps.changed-files-write-output-files.outputs.all_changed_files) }}'
cat .github/outputs/all_changed_files.json
shell :
bash
2022-11-03 08:33:45 -06:00
- name : Run changed-files with include_all_old_new_renamed_files
2022-11-03 08:41:37 -06:00
id : changed-files-all-old-new-renamed-files
2022-11-03 08:33:45 -06:00
uses : ./
with :
include_all_old_new_renamed_files : true
- name : Show output
run : |
2022-11-03 08:41:37 -06:00
echo '${{ toJSON(steps.changed-files-all-old-new-renamed-files.outputs) }}'
2022-11-03 08:33:45 -06:00
shell :
bash
2021-03-25 19:23:19 -04:00
- name : List all modified files
2021-03-20 08:09:58 -04:00
run : |
2021-10-12 09:47:12 -04:00
for file in ${{ steps.changed-files.outputs.modified_files }}; do
2021-03-20 08:09:58 -04:00
echo $file
done
2021-06-18 10:19:28 -04:00
shell :
bash
2021-04-02 08:27:48 -04:00
- name : Run step when README.md changes
2021-04-02 09:00:06 -04:00
if : contains(steps.changed-files.outputs.modified_files, 'README.md')
2021-04-02 08:27:48 -04:00
run : |
2021-04-02 09:12:33 -04:00
echo "Your README.md has been modified ${{ steps.changed-files.outputs.modified_files }}."
2021-06-18 10:19:28 -04:00
shell :
bash
2022-09-29 12:11:21 -06:00
- name : Run changed-files with quotepath disabled for single path
id : changed-files-quotepath-specific
uses : ./
with :
files : test/test-è.txt
quotepath : "false"
- name : Show output
run : |
echo '${{ toJSON(steps.changed-files-quotepath-specific.outputs) }}'
shell :
bash
2022-04-28 02:08:15 -04:00
- name : Run changed-files with quotepath disabled
id : changed-files-quotepath
uses : ./
with :
quotepath : "false"
- name : Show output
run : |
echo '${{ toJSON(steps.changed-files-quotepath.outputs) }}'
shell :
bash
2022-11-23 17:32:14 -07:00
- name : Run changed-files with dir_names and dir_names_max_depth
id : changed-files-dir-names-max-depth
uses : ./
with :
base_sha : ba788ed
sha : 0a5b7c6
fetch_depth : 60000
dir_names : "true"
dir_names_max_depth : 3
2023-07-13 13:01:23 -06:00
dir_names_exclude_current_dir : "true"
2022-11-23 17:32:14 -07:00
- name : Show output
run : |
echo '${{ toJSON(steps.changed-files-dir-names-max-depth.outputs) }}'
shell :
bash
2023-08-22 22:06:23 -06:00
- name : Check dir_names output on non windows platform
if : "!contains(steps.changed-files-dir-names-max-depth.outputs.all_changed_files, 'test/test2/test3') && runner.os != 'Windows'"
2022-11-23 17:32:14 -07:00
run : |
echo "Invalid output: Expected to include (test/test2/test3) got (${{ steps.changed-files-dir-names-max-depth.outputs.all_changed_files }})"
exit 1
shell :
bash
2023-08-22 22:06:23 -06:00
- name : Check dir_names output on windows platform
if : "!contains(steps.changed-files-dir-names-max-depth.outputs.all_changed_files, 'test\\test2\\test3') && runner.os == 'Windows'"
run : |
echo "Invalid output: Expected to not include (test\\test2\\test3) got (${{ steps.changed-files-dir-names-max-depth.outputs.all_changed_files }})"
exit 1
shell :
bash
2023-06-23 12:06:47 -06:00
- name : Run changed-files with dir_names and dir_names_exclude_current_dir
2023-01-31 17:38:55 -07:00
id : changed-files-dir-names-exclude-root
uses : ./
with :
base_sha : dddfbd69
sha : ce8c1983
fetch_depth : 60000
dir_names : "true"
2023-06-23 12:06:47 -06:00
dir_names_exclude_current_dir : "true"
2023-08-21 21:11:59 -06:00
dir_names_max_depth : 1
2023-01-31 17:38:55 -07:00
- name : Show output
run : |
echo '${{ toJSON(steps.changed-files-dir-names-exclude-root.outputs) }}'
shell :
bash
- name : Check dir_names output
if : steps.changed-files-dir-names-exclude-root.outputs.all_changed_files != '.github'
run : |
echo "Invalid output: Expected (.github) got (${{ steps.changed-files-dir-names-exclude-root.outputs.all_changed_files }})"
exit 1
shell :
bash
2022-06-12 10:08:13 -04:00
- name : Run changed-files with dir_names
2022-06-12 10:11:04 -04:00
id : changed-files-dir-names
2022-06-12 10:08:13 -04:00
uses : ./
with :
2022-08-25 21:46:41 -06:00
base_sha : d1c0ee4
sha : 4d04215
2022-11-03 11:31:52 -06:00
fetch_depth : 60000
2022-06-12 10:08:13 -04:00
dir_names : "true"
- name : Show output
run : |
2022-06-12 10:11:04 -04:00
echo '${{ toJSON(steps.changed-files-dir-names.outputs) }}'
2022-06-12 10:08:13 -04:00
shell :
bash
2022-08-25 21:46:41 -06:00
- name : Check dir_names output
2023-01-04 18:13:54 -07:00
if : steps.changed-files-dir-names.outputs.all_changed_files != 'test'
2022-08-25 21:46:41 -06:00
run : |
2023-01-04 18:13:54 -07:00
echo "Invalid output: Expected (test) got (${{ steps.changed-files-dir-names.outputs.all_changed_files }})"
2022-08-25 21:46:41 -06:00
exit 1
shell :
bash
2022-11-04 11:40:18 -06:00
- name : Run changed-files with dir_names specific
2022-11-04 11:08:33 -06:00
id : changed-files-dir-names-specific
uses : ./
with :
base_sha : d1c0ee4
sha : 4d04215
fetch_depth : 60000
2023-08-21 21:11:59 -06:00
dir_names : true
2022-11-04 11:08:33 -06:00
files : test/**
- name : Show output
run : |
echo '${{ toJSON(steps.changed-files-dir-names-specific.outputs) }}'
shell :
bash
- name : Check dir_names output
2023-08-21 21:11:59 -06:00
if : steps.changed-files-dir-names-specific.outputs.all_changed_files != 'test'
2022-11-04 11:08:33 -06:00
run : |
2023-01-04 18:13:54 -07:00
echo "Invalid output: Expected (test) got (${{ steps.changed-files-dir-names-specific.outputs.all_changed_files }})"
2022-11-04 11:08:33 -06:00
exit 1
shell :
bash
2023-08-21 21:11:59 -06:00
- name : Run changed-files with dir_names and dir_names_include_files with specific files
id : changed-files-dir-names-specific-include-files
uses : ./
with :
base_sha : d1c0ee4
sha : 4d04215
fetch_depth : 60000
dir_names : true
dir_names_include_files : test/*.txt
files : test/**
json : true
- name : Show output
run : |
echo '${{ toJSON(steps.changed-files-dir-names-specific-include-files.outputs) }}'
shell :
bash
2023-08-22 22:06:23 -06:00
- name : Check dir_names output on non windows platform
if : |
(
!contains(steps.changed-files-dir-names-specific-include-files.outputs.all_changed_files, 'test/test rename-1.txt') ||
2023-09-04 14:03:32 -06:00
!contains(steps.changed-files-dir-names-specific-include-files.outputs.all_changed_files, 'test') ||
steps.changed-files-dir-names-specific-include-files.outputs.any_changed == 'false'
2023-08-22 22:06:23 -06:00
) && runner.os != 'Windows'
2023-08-21 21:11:59 -06:00
run : |
echo "Invalid output: Expected to include (test/test rename-1.txt) and (test) got (${{ steps.changed-files-dir-names-specific-include-files.outputs.all_changed_files }})"
exit 1
shell :
bash
2023-08-22 22:06:23 -06:00
- name : Check dir_names output on windows platform
if : |
(
!contains(steps.changed-files-dir-names-specific-include-files.outputs.all_changed_files, 'test\\test rename-1.txt') ||
2023-09-04 14:03:32 -06:00
!contains(steps.changed-files-dir-names-specific-include-files.outputs.all_changed_files, 'test') ||
steps.changed-files-dir-names-specific-include-files.outputs.any_changed == 'false'
2023-08-22 22:06:23 -06:00
) && runner.os == 'Windows'
run : |
echo "Invalid output: Expected to include (test\\test rename-1.txt) and (test) got (${{ steps.changed-files-dir-names-specific-include-files.outputs.all_changed_files }})"
exit 1
shell :
bash
2023-09-04 14:03:32 -06:00
- name : Run changed-files with dir_names for specific files and an unmatched path
id : changed-files-dir-names-specific-unmatched-path
uses : ./
with :
base_sha : d1c0ee4
sha : 4d04215
fetch_depth : 60000
dir_names : true
files : unknown/**
json : true
- name : Show output
run : |
echo '${{ toJSON(steps.changed-files-dir-names-specific-unmatched-path.outputs) }}'
shell :
bash
- name : Check dir_names output
if : |
(
steps.changed-files-dir-names-specific-unmatched-path.outputs.all_changed_files != '[]' ||
steps.changed-files-dir-names-specific-unmatched-path.outputs.any_changed == 'true' ||
steps.changed-files-dir-names-specific-unmatched-path.outputs.all_changed_files_count != '0'
)
run : |
echo "Invalid output: Expected empty array and any_changed to be false got (${{ steps.changed-files-dir-names-specific-unmatched-path.outputs.all_changed_files }}) and (${{ steps.changed-files-dir-names-specific-unmatched-path.outputs.any_changed }})"
exit 1
shell :
bash
2021-09-04 09:08:20 -04:00
- name : Run changed-files with forward slash separator
id : changed-files-forward-slash
uses : ./
with :
separator : "/"
- name : Show output
run : |
echo '${{ toJSON(steps.changed-files-forward-slash.outputs) }}'
shell :
bash
2022-03-08 06:59:26 -05:00
- name : Run changed-files with newline separator
id : changed-files-newline
uses : ./
with :
separator : "\n"
- name : Show output
run : |
echo '${{ toJSON(steps.changed-files-newline.outputs) }}'
shell :
bash
2021-09-04 09:08:20 -04:00
- name : Run changed-files with pipe separator
id : changed-files-pipe
uses : ./
with :
separator : "|"
- name : Show output
run : |
echo '${{ toJSON(steps.changed-files-pipe.outputs) }}'
shell :
bash
2022-08-03 14:01:40 -06:00
- name : Run changed-files with json output
id : changed-files-json
uses : ./
with :
json : true
- name : Show output
run : |
echo '${{ toJSON(steps.changed-files-json.outputs) }}'
echo '${{ toJSON(steps.changed-files-json.outputs.all_changed_files) }}'
shell :
bash
2023-05-25 21:14:24 -06:00
- name : Run changed-files with json unescaped format
id : changed-files-json-unescaped
2022-12-30 06:27:08 +01:00
uses : ./
with :
json : true
2023-05-25 21:14:24 -06:00
escape_json : false
2022-12-30 06:27:08 +01:00
- name : Show output
run : |
2023-05-25 21:14:24 -06:00
echo '${{ toJSON(steps.changed-files-json-unescaped.outputs) }}'
echo '${{ toJSON(steps.changed-files-json-unescaped.outputs.all_changed_files) }}'
2022-12-30 06:27:08 +01:00
shell :
bash
2021-03-05 07:28:53 -05:00
- name : Run changed-files with comma separator
id : changed-files-comma
uses : ./
with :
separator : ","
2022-09-04 22:28:32 -06:00
- name : List all modified files
run : |
2022-09-04 23:34:23 -06:00
IFS=$',' read -a MODIFIED_FILES_ARRAY <<< "${{ steps.changed-files-comma.outputs.modified_files }}"
for file in "${MODIFIED_FILES_ARRAY[@]}"; do
2022-09-04 22:28:32 -06:00
echo $file
done
unset IFS
shell :
bash
2021-03-05 07:28:53 -05:00
- name : Show output
run : |
2021-09-04 09:08:20 -04:00
echo '${{ toJSON(steps.changed-files-comma.outputs) }}'
2021-06-18 10:19:28 -04:00
shell :
bash
2022-03-08 06:59:26 -05:00
- name : Run changed-files with specific files from a source file using a newline separator
id : changed-files-specific-newline-source-file
uses : ./
with :
files_from_source_file : |
test/changed-files-list.txt
separator : "\n"
- name : Show output
run : |
echo '${{ toJSON(steps.changed-files-specific-newline-source-file.outputs) }}'
shell :
bash
2022-05-14 17:05:44 -04:00
- name : Run changed-files for old new filenames test rename 1
2022-05-14 17:54:38 -04:00
id : changed-files-all-old-new-renamed-files-1
2022-05-14 17:05:44 -04:00
uses : ./
with :
base_sha : d1c0ee4
sha : 4d04215
2022-11-03 11:31:52 -06:00
fetch_depth : 60000
2022-05-25 17:47:58 -04:00
include_all_old_new_renamed_files : true
2022-08-20 20:41:36 -06:00
- name : Show output
2022-05-14 17:05:44 -04:00
run : |
2022-05-14 17:54:38 -04:00
echo '${{ toJSON(steps.changed-files-all-old-new-renamed-files-1.outputs) }}'
2022-05-14 17:05:44 -04:00
shell :
bash
2023-08-22 22:06:23 -06:00
- name : Check all_old_new_renamed_files output on non windows platform
if : "!contains(steps.changed-files-all-old-new-renamed-files-1.outputs.all_old_new_renamed_files, 'test/test rename 1.txt,test/test rename-1.txt') && runner.os != 'Windows'"
2022-05-14 17:05:44 -04:00
run : |
2022-05-14 17:56:47 -04:00
echo "Invalid output: Expected to include (test/test rename 1.txt,test/test rename-1.txt) got (${{ steps.changed-files-all-old-new-renamed-files-1.outputs.all_old_new_renamed_files }})"
2022-05-14 17:05:44 -04:00
exit 1
shell :
bash
2023-08-22 22:06:23 -06:00
- name : Check all_old_new_renamed_files output on windows platform
if : "!contains(steps.changed-files-all-old-new-renamed-files-1.outputs.all_old_new_renamed_files, 'test\\test rename 1.txt,test\\test rename-1.txt') && runner.os == 'Windows'"
run : |
echo "Invalid output: Expected to not include (test\\test rename 1.txt,test\\test rename-1.txt) got (${{ steps.changed-files-all-old-new-renamed-files-1.outputs.all_old_new_renamed_files }})"
exit 1
shell :
bash
- name : Check the renamed_files output on non windows platform
if : "!contains(steps.changed-files-all-old-new-renamed-files-1.outputs.renamed_files, 'test/test rename-1.txt') && runner.os != 'Windows'"
2023-06-19 15:34:12 -06:00
run : |
echo "Invalid output: Expected to include (test/test rename-1.txt) got (${{ steps.changed-files-all-old-new-renamed-files-1.outputs.renamed_files }})"
exit 1
shell :
bash
2023-08-22 22:06:23 -06:00
- name : Check the renamed_files output on windows platform
if : "!contains(steps.changed-files-all-old-new-renamed-files-1.outputs.renamed_files, 'test\\test rename-1.txt') && runner.os == 'Windows'"
run : |
echo "Invalid output: Expected to not include (test\\test rename-1.txt) got (${{ steps.changed-files-all-old-new-renamed-files-1.outputs.renamed_files }})"
exit 1
shell :
bash
2022-05-14 17:05:44 -04:00
- name : Run changed-files for old new filenames test rename 2
2022-05-14 17:54:38 -04:00
id : changed-files-all-old-new-renamed-files-2
2022-05-14 17:05:44 -04:00
uses : ./
with :
base_sha : 4d04215
sha : fe238e6
2022-11-03 11:31:52 -06:00
fetch_depth : 60000
2022-05-25 17:47:58 -04:00
include_all_old_new_renamed_files : true
2022-05-14 17:05:44 -04:00
- name : Show output
run : |
2022-05-14 17:54:38 -04:00
echo '${{ toJSON(steps.changed-files-all-old-new-renamed-files-2.outputs) }}'
2022-05-14 17:05:44 -04:00
shell :
bash
2023-08-22 22:06:23 -06:00
- name : Check all_old_new_renamed_files output on non windows platform
if : "!contains(steps.changed-files-all-old-new-renamed-files-2.outputs.all_old_new_renamed_files, 'test/test rename 2.txt,test/test rename-2.txt') && runner.os != 'Windows'"
2022-05-14 17:05:44 -04:00
run : |
2022-05-14 17:56:47 -04:00
echo "Invalid output: Expected to include (test/test rename 2.txt test/test rename-2.txt) got (${{ steps.changed-files-all-old-new-renamed-files-2.outputs.all_old_new_renamed_files }})"
2023-06-14 13:59:31 -06:00
exit 1
shell :
bash
2023-08-22 22:06:23 -06:00
- name : Check all_old_new_renamed_files output on windows platform
if : "!contains(steps.changed-files-all-old-new-renamed-files-2.outputs.all_old_new_renamed_files, 'test\\test rename 2.txt,test\\test rename-2.txt') && runner.os == 'Windows'"
run : |
echo "Invalid output: Expected to not include (test\\test rename 2.txt test/test rename-2.txt) got (${{ steps.changed-files-all-old-new-renamed-files-2.outputs.all_old_new_renamed_files }})"
exit 1
shell :
bash
- name : Check the renamed_files output on non windows platform
if : "!contains(steps.changed-files-all-old-new-renamed-files-2.outputs.renamed_files, 'test/test rename-2.txt') && runner.os != 'Windows'"
2023-06-19 15:34:12 -06:00
run : |
echo "Invalid output: Expected to include (test/test rename-2.txt) got (${{ steps.changed-files-all-old-new-renamed-files-2.outputs.renamed_files }})"
exit 1
shell :
bash
2023-08-22 22:06:23 -06:00
- name : Check the renamed_files output on windows platform
if : "!contains(steps.changed-files-all-old-new-renamed-files-2.outputs.renamed_files, 'test\\test rename-2.txt') && runner.os == 'Windows'"
run : |
echo "Invalid output: Expected to not include (test\\test rename-2.txt) got (${{ steps.changed-files-all-old-new-renamed-files-2.outputs.renamed_files }})"
exit 1
shell :
bash
2023-06-14 13:59:31 -06:00
- name : Run changed-files for old new filenames test rename 2 output as deleted and added
id : changed-files-all-old-new-renamed-files-2-output-as-deleted-and-added
uses : ./
with :
base_sha : 4d04215
sha : fe238e6
fetch_depth : 60000
include_all_old_new_renamed_files : true
output_renamed_files_as_deleted_and_added : true
- name : Show output
run : |
echo '${{ toJSON(steps.changed-files-all-old-new-renamed-files-2-output-as-deleted-and-added.outputs) }}'
shell :
bash
2023-08-22 22:06:23 -06:00
- name : Check all_old_new_renamed_files output on non windows platform
if : "!contains(steps.changed-files-all-old-new-renamed-files-2-output-as-deleted-and-added.outputs.all_old_new_renamed_files, 'test/test rename 2.txt,test/test rename-2.txt') && runner.os != 'Windows'"
2023-06-14 13:59:31 -06:00
run : |
echo "Invalid output: Expected to include (test/test rename 2.txt test/test rename-2.txt) got (${{ steps.changed-files-all-old-new-renamed-files-2-output-as-deleted-and-added.outputs.all_old_new_renamed_files }})"
exit 1
shell :
bash
2023-08-22 22:06:23 -06:00
- name : Check all_old_new_renamed_files output on windows platform
if : "!contains(steps.changed-files-all-old-new-renamed-files-2-output-as-deleted-and-added.outputs.all_old_new_renamed_files, 'test\\test rename 2.txt,test\\test rename-2.txt') && runner.os == 'Windows'"
run : |
echo "Invalid output: Expected to not include (test\\test rename 2.txt test\\test rename-2.txt) got (${{ steps.changed-files-all-old-new-renamed-files-2-output-as-deleted-and-added.outputs.all_old_new_renamed_files }})"
exit 1
shell :
bash
- name : Check deleted_files output on non windows platform
if : "!contains(steps.changed-files-all-old-new-renamed-files-2-output-as-deleted-and-added.outputs.deleted_files, 'test/test rename 2.txt') && runner.os != 'Windows'"
2023-06-14 13:59:31 -06:00
run : |
echo "Invalid output: Expected to include (test/test rename 2.txt) got (${{ steps.changed-files-all-old-new-renamed-files-2-output-as-deleted-and-added.outputs.deleted_files }})"
exit 1
shell :
bash
2023-08-22 22:06:23 -06:00
- name : Check deleted_files output on windows platform
if : "!contains(steps.changed-files-all-old-new-renamed-files-2-output-as-deleted-and-added.outputs.deleted_files, 'test\\test rename 2.txt') && runner.os == 'Windows'"
run : |
echo "Invalid output: Expected to not include (test\\test rename 2.txt) got (${{ steps.changed-files-all-old-new-renamed-files-2-output-as-deleted-and-added.outputs.deleted_files }})"
exit 1
shell :
bash
- name : Check added_files output on non windows platform
if : "!contains(steps.changed-files-all-old-new-renamed-files-2-output-as-deleted-and-added.outputs.added_files, 'test/test rename-2.txt') && runner.os != 'Windows'"
2023-06-14 13:59:31 -06:00
run : |
echo "Invalid output: Expected to include (test/test rename-2.txt) got (${{ steps.changed-files-all-old-new-renamed-files-2-output-as-deleted-and-added.outputs.added_files }})"
2022-05-14 17:05:44 -04:00
exit 1
shell :
bash
2023-08-22 22:06:23 -06:00
- name : Check added_files output on windows platform
if : "!contains(steps.changed-files-all-old-new-renamed-files-2-output-as-deleted-and-added.outputs.added_files, 'test\\test rename-2.txt') && runner.os == 'Windows'"
run : |
echo "Invalid output: Expected to not include (test\\test rename-2.txt) got (${{ steps.changed-files-all-old-new-renamed-files-2-output-as-deleted-and-added.outputs.added_files }})"
exit 1
shell :
bash
2021-05-01 07:55:01 -04:00
- name : Run changed-files with specific files
id : changed-files-specific
uses : ./
with :
files : |
.github/workflows/test.yml
2021-05-01 19:58:35 -04:00
action.yml
2022-01-26 12:41:38 +09:00
**/test.txt
2022-02-14 22:33:45 -05:00
files_ignore : |
test/test/test.txt
2021-09-04 09:08:20 -04:00
- name : Show output
run : |
echo '${{ toJSON(steps.changed-files-specific.outputs) }}'
shell :
bash
2023-08-22 22:06:23 -06:00
- name : Check if a excluded file is not included in any_changed on non windows platform
if : "contains(steps.changed-files-specific.outputs.all_changed_files, 'test/test/test.txt') && runner.os != 'Windows'"
2022-01-25 10:50:47 +09:00
run : |
2022-01-26 12:41:38 +09:00
echo "Invalid output: Expected not to include (test/test/test.txt) got (${{ steps.changed-files-specific.outputs.all_changed_files }})"
2022-01-25 10:50:47 +09:00
exit 1
shell :
bash
2023-08-22 22:06:23 -06:00
- name : Check if a excluded file is not included in any_changed on windows platform
if : "contains(steps.changed-files-specific.outputs.all_changed_files, 'test\\test\\test.txt') && runner.os == 'Windows'"
run : |
echo "Invalid output: Expected not to include (test\\test\\test.txt) got (${{ steps.changed-files-specific.outputs.all_changed_files }})"
exit 1
shell :
bash
- name : Verify any_changed for specific files on non windows platform
if : "!contains(steps.changed-files-specific.outputs.all_changed_files, 'action.yml') && !contains(steps.changed-files-specific.outputs.all_changed_files, '.github/workflows/test.yml') && !contains(steps.changed-files-specific.outputs.all_changed_files, 'test/test.txt') && runner.os != 'Windows'"
2021-05-16 16:26:22 -04:00
run : |
2021-05-17 04:19:10 -04:00
if [[ "${{ steps.changed-files-specific.outputs.any_changed }}" != "false" ]]; then
echo "Invalid output: Expected (false) got (${{ steps.changed-files-specific.outputs.any_changed }})"
2021-05-16 16:26:22 -04:00
exit 1
fi
2021-06-18 10:19:28 -04:00
shell :
bash
2023-08-22 22:06:23 -06:00
- name : Verify any_changed for specific files on windows platform
if : "!contains(steps.changed-files-specific.outputs.all_changed_files, 'action.yml') && !contains(steps.changed-files-specific.outputs.all_changed_files, '.github\\workflows\\test.yml') && !contains(steps.changed-files-specific.outputs.all_changed_files, 'test\\test.txt') && runner.os == 'Windows'"
run : |
if [[ "${{ steps.changed-files-specific.outputs.any_changed }}" != "false" ]]; then
echo "Invalid output: Expected (false) got (${{ steps.changed-files-specific.outputs.any_changed }})"
exit 1
fi
shell :
bash
- name : Check if a excluded file is not included in any_modified on non windows platform
if : "contains(steps.changed-files-specific.outputs.all_modified_files, 'test/test/test.txt') && runner.os != 'Windows'"
2022-01-25 10:50:47 +09:00
run : |
2022-01-26 12:41:38 +09:00
echo "Invalid output: Expected not to include (test/test/test.txt) got (${{ steps.changed-files-specific.outputs.all_modified_files }})"
2022-01-25 10:50:47 +09:00
exit 1
shell :
bash
2023-08-22 22:06:23 -06:00
- name : Check if a excluded file is not included in any_modified on windows platform
if : "contains(steps.changed-files-specific.outputs.all_modified_files, 'test\\test\\test.txt') && runner.os == 'Windows'"
run : |
echo "Invalid output: Expected not to include (test\\test\\test.txt) got (${{ steps.changed-files-specific.outputs.all_modified_files }})"
exit 1
shell :
bash
- name : Verify any_modified for specific files on non windows platform
if : "!contains(steps.changed-files-specific.outputs.all_modified_files, 'action.yml') && !contains(steps.changed-files-specific.outputs.all_modified_files, '.github/workflows/test.yml') && !contains(steps.changed-files-specific.outputs.all_modified_files, 'test/test.txt') && runner.os != 'Windows'"
2021-12-14 02:01:31 -05:00
run : |
if [[ "${{ steps.changed-files-specific.outputs.any_modified }}" != "false" ]]; then
echo "Invalid output: Expected (false) got (${{ steps.changed-files-specific.outputs.any_modified }})"
exit 1
fi
shell :
bash
2023-08-22 22:06:23 -06:00
- name : Verify any_modified for specific files on windows platform
if : "!contains(steps.changed-files-specific.outputs.all_modified_files, 'action.yml') && !contains(steps.changed-files-specific.outputs.all_modified_files, '.github\\workflows\\test.yml') && !contains(steps.changed-files-specific.outputs.all_modified_files, 'test\\test.txt') && runner.os == 'Windows'"
run : |
if [[ "${{ steps.changed-files-specific.outputs.any_modified }}" != "false" ]]; then
echo "Invalid output: Expected (false) got (${{ steps.changed-files-specific.outputs.any_modified }})"
exit 1
fi
shell :
bash
2023-09-22 10:14:29 -06:00
- name : Check if an excluded file is included in deleted_files output on non windows platform
2023-08-22 22:06:23 -06:00
if : "contains(steps.changed-files-specific.outputs.deleted_files, 'test/test/test.txt') && runner.os != 'Windows'"
2022-01-25 10:50:47 +09:00
run : |
2022-01-26 12:41:38 +09:00
echo "Invalid output: Expected not to include (test/test/test.txt) got (${{ steps.changed-files-specific.outputs.deleted_files }})"
2022-01-25 10:50:47 +09:00
exit 1
shell :
bash
2023-09-22 10:14:29 -06:00
- name : Check if an excluded file is included in deleted_files output on windows platform
2023-08-22 22:06:23 -06:00
if : "contains(steps.changed-files-specific.outputs.deleted_files, 'test\\test\\test.txt') && runner.os == 'Windows'"
run : |
echo "Invalid output: Expected not to include (test\\test\\test.txt) got (${{ steps.changed-files-specific.outputs.deleted_files }})"
exit 1
shell :
bash
- name : Verify any_deleted for specific files on non windows platform
if : "!contains(steps.changed-files-specific.outputs.deleted_files, 'action.yml') && !contains(steps.changed-files-specific.outputs.deleted_files, '.github/workflows/test.yml') && !contains(steps.changed-files-specific.outputs.deleted_files, 'test/test.txt') && runner.os != 'Windows'"
run : |
if [[ "${{ steps.changed-files-specific.outputs.any_deleted }}" != "false" ]]; then
echo "Invalid output: Expected (false) got (${{ steps.changed-files-specific.outputs.any_deleted }})"
exit 1
fi
shell :
bash
- name : Verify any_deleted for specific files on windows platform
if : "!contains(steps.changed-files-specific.outputs.deleted_files, 'action.yml') && !contains(steps.changed-files-specific.outputs.deleted_files, '.github\\workflows\\test.yml') && !contains(steps.changed-files-specific.outputs.deleted_files, 'test\\test.txt') && runner.os == 'Windows'"
2021-09-05 08:22:47 -04:00
run : |
if [[ "${{ steps.changed-files-specific.outputs.any_deleted }}" != "false" ]]; then
echo "Invalid output: Expected (false) got (${{ steps.changed-files-specific.outputs.any_deleted }})"
exit 1
fi
shell :
bash
2021-08-06 06:14:50 -04:00
- name : Run changed-files with specific files comma check duplicates
id : changed-files-specific-duplicate-output
uses : ./
with :
files : |
2022-09-24 18:30:52 -06:00
get-changed-paths.sh
2021-08-06 06:14:50 -04:00
*.sh
2021-12-14 02:01:31 -05:00
- name : Verify all_changed_files files has no duplicates
2022-09-24 18:30:52 -06:00
if : contains(steps.changed-files-specific-duplicate-output.outputs.all_changed_files, 'get-changed-paths.sh')
2021-08-06 06:14:50 -04:00
run : |
2021-12-14 02:01:31 -05:00
ALL_CHANGED_FILES=(${{ steps.changed-files-specific-duplicate-output.outputs.all_changed_files }})
UNIQUE_ALL_CHANGED_FILES=$(echo "$ALL_CHANGED_FILES" | tr ' ' '\n' | sort -u | xargs)
if [[ "$ALL_CHANGED_FILES[@]" != "$UNIQUE_ALL_CHANGED_FILES[@]" ]]; then
echo "Duplicate output: Expected "$UNIQUE_ALL_CHANGED_FILES" got $ALL_CHANGED_FILES"
exit 1
fi
shell :
bash
- name : Verify all_changed_and_modified_files files has no duplicates
2022-09-24 18:30:52 -06:00
if : contains(steps.changed-files-specific-duplicate-output.outputs.all_changed_and_modified_files, 'get-changed-paths.sh')
2021-12-14 02:01:31 -05:00
run : |
ALL_CHANGED_AND_MODIFIED_FILES=(${{ steps.changed-files-specific-duplicate-output.outputs.all_changed_and_modified_files }})
2021-09-04 09:42:11 -04:00
UNIQUE_ALL_CHANGED_AND_MODIFIED_FILES=$(echo "$ALL_CHANGED_AND_MODIFIED_FILES" | tr ' ' '\n' | sort -u | xargs)
2021-08-06 06:14:50 -04:00
2021-09-04 09:42:11 -04:00
if [[ "$ALL_CHANGED_AND_MODIFIED_FILES[@]" != "$UNIQUE_ALL_CHANGED_AND_MODIFIED_FILES[@]" ]]; then
echo "Duplicate output: Expected "$UNIQUE_ALL_CHANGED_AND_MODIFIED_FILES" got $ALL_CHANGED_AND_MODIFIED_FILES"
2021-08-06 06:14:50 -04:00
exit 1
fi
shell :
bash
2021-12-14 02:01:31 -05:00
- name : Verify all_modified_files files has no duplicates
2022-09-24 18:30:52 -06:00
if : contains(steps.changed-files-specific-duplicate-output.outputs.all_modified_files, 'get-changed-paths.sh')
2021-12-14 02:01:31 -05:00
run : |
ALL_MODIFIED_FILES=(${{ steps.changed-files-specific-duplicate-output.outputs.all_modified_files }})
UNIQUE_ALL_MODIFIED_FILES=$(echo "$ALL_MODIFIED_FILES" | tr ' ' '\n' | sort -u | xargs)
if [[ "$ALL_MODIFIED_FILES[@]" != "$UNIQUE_ALL_MODIFIED_FILES[@]" ]]; then
echo "Duplicate output: Expected "$UNIQUE_ALL_MODIFIED_FILES" got $ALL_MODIFIED_FILES"
exit 1
fi
shell :
bash
2021-05-01 08:59:18 -04:00
- name : Run changed-files with specific files comma separator
id : changed-files-specific-comma
uses : ./
with :
files : |
.github/workflows/test.yml
2021-05-01 19:58:35 -04:00
action.yml
2021-05-01 08:59:18 -04:00
separator : ","
2021-09-04 09:08:20 -04:00
- name : Show output
run : |
echo '${{ toJSON(steps.changed-files-specific-comma.outputs) }}'
shell :
bash
2023-08-22 22:06:23 -06:00
- name : Verify any_changed files comma separator on non windows platform
if : "!contains(steps.changed-files-specific-comma.outputs.all_changed_files, 'action.yml') && !contains(steps.changed-files-specific-comma.outputs.all_changed_files, '.github/workflows/test.yml') && runner.os != 'Windows'"
run : |
if [[ "${{ steps.changed-files-specific-comma.outputs.any_changed }}" != "false" ]]; then
echo "Invalid output: Expected (false) got (${{ steps.changed-files-specific-comma.outputs.any_changed }})"
exit 1
fi
shell :
bash
- name : Verify any_changed files comma separator on windows platform
if : "!contains(steps.changed-files-specific-comma.outputs.all_changed_files, 'action.yml') && !contains(steps.changed-files-specific-comma.outputs.all_changed_files, '.github\\workflows\\test.yml') && runner.os == 'Windows'"
2021-09-04 09:08:20 -04:00
run : |
if [[ "${{ steps.changed-files-specific-comma.outputs.any_changed }}" != "false" ]]; then
echo "Invalid output: Expected (false) got (${{ steps.changed-files-specific-comma.outputs.any_changed }})"
exit 1
fi
shell :
bash
2023-08-22 22:06:23 -06:00
- name : Verify any_modified files comma separator on non windows platform
if : "!contains(steps.changed-files-specific-comma.outputs.all_modified_files, 'action.yml') && !contains(steps.changed-files-specific-comma.outputs.all_modified_files, '.github/workflows/test.yml') && runner.os != 'Windows'"
2021-12-14 02:01:31 -05:00
run : |
if [[ "${{ steps.changed-files-specific-comma.outputs.any_modified }}" != "false" ]]; then
echo "Invalid output: Expected (false) got (${{ steps.changed-files-specific-comma.outputs.any_modified }})"
exit 1
fi
shell :
bash
2023-08-22 22:06:23 -06:00
- name : Verify any_modified files comma separator on windows platform
if : "!contains(steps.changed-files-specific-comma.outputs.all_modified_files, 'action.yml') && !contains(steps.changed-files-specific-comma.outputs.all_modified_files, '.github\\workflows\\test.yml') && runner.os == 'Windows'"
run : |
if [[ "${{ steps.changed-files-specific-comma.outputs.any_modified }}" != "false" ]]; then
echo "Invalid output: Expected (false) got (${{ steps.changed-files-specific-comma.outputs.any_modified }})"
exit 1
fi
shell :
bash
- name : Verify any_deleted files comma separator on non windows platform
if : "!contains(steps.changed-files-specific-comma.outputs.deleted_files, 'action.yml') && !contains(steps.changed-files-specific-comma.outputs.deleted_files, '.github/workflows/test.yml') && runner.os != 'Windows'"
run : |
if [[ "${{ steps.changed-files-specific-comma.outputs.any_deleted }}" != "false" ]]; then
echo "Invalid output: Expected (false) got (${{ steps.changed-files-specific-comma.outputs.any_deleted }})"
exit 1
fi
shell :
bash
- name : Verify any_deleted files comma separator on windows platform
if : "!contains(steps.changed-files-specific-comma.outputs.deleted_files, 'action.yml') && !contains(steps.changed-files-specific-comma.outputs.deleted_files, '.github\\workflows\\test.yml') && runner.os == 'Windows'"
2021-09-05 08:22:47 -04:00
run : |
if [[ "${{ steps.changed-files-specific-comma.outputs.any_deleted }}" != "false" ]]; then
echo "Invalid output: Expected (false) got (${{ steps.changed-files-specific-comma.outputs.any_deleted }})"
exit 1
fi
shell :
bash
2021-09-04 09:08:20 -04:00
- name : Run changed-files with specific files pipe separator
id : changed-files-specific-pipe
uses : ./
with :
files : |
2022-01-04 21:38:03 -05:00
**/test.yml
2021-09-04 09:08:20 -04:00
action.yml
separator : "|"
- name : Show output
run : |
echo '${{ toJSON(steps.changed-files-specific-pipe.outputs) }}'
shell :
bash
2023-08-22 22:06:23 -06:00
- name : Verify any_changed files comma separator on non windows platform
if : "!contains(steps.changed-files-specific-pipe.outputs.all_changed_files, 'action.yml') && !contains(steps.changed-files-specific-pipe.outputs.all_changed_files, '.github/workflows/test.yml') && runner.os != 'Windows'"
run : |
if [[ "${{ steps.changed-files-specific-pipe.outputs.any_changed }}" != "false" ]]; then
echo "Invalid output: Expected (false) got (${{ steps.changed-files-specific-pipe.outputs.any_changed }})"
exit 1
fi
shell :
bash
- name : Verify any_changed files comma separator on windows platform
if : "!contains(steps.changed-files-specific-pipe.outputs.all_changed_files, 'action.yml') && !contains(steps.changed-files-specific-pipe.outputs.all_changed_files, '.github\\workflows\\test.yml') && runner.os == 'Windows'"
2021-09-04 09:08:20 -04:00
run : |
if [[ "${{ steps.changed-files-specific-pipe.outputs.any_changed }}" != "false" ]]; then
echo "Invalid output: Expected (false) got (${{ steps.changed-files-specific-pipe.outputs.any_changed }})"
exit 1
fi
shell :
bash
2023-08-22 22:06:23 -06:00
- name : Verify any_modified files comma separator on non windows platform
if : "!contains(steps.changed-files-specific-pipe.outputs.all_modified_files, 'action.yml') && !contains(steps.changed-files-specific-pipe.outputs.all_modified_files, '.github/workflows/test.yml') && runner.os != 'Windows'"
2021-12-14 02:01:31 -05:00
run : |
if [[ "${{ steps.changed-files-specific-pipe.outputs.any_modified }}" != "false" ]]; then
echo "Invalid output: Expected (false) got (${{ steps.changed-files-specific-pipe.outputs.any_modified }})"
exit 1
fi
shell :
bash
2023-08-22 22:06:23 -06:00
- name : Verify any_modified files comma separator on windows platform
if : "!contains(steps.changed-files-specific-pipe.outputs.all_modified_files, 'action.yml') && !contains(steps.changed-files-specific-pipe.outputs.all_modified_files, '.github\\workflows\\test.yml') && runner.os == 'Windows'"
run : |
if [[ "${{ steps.changed-files-specific-pipe.outputs.any_modified }}" != "false" ]]; then
echo "Invalid output: Expected (false) got (${{ steps.changed-files-specific-pipe.outputs.any_modified }})"
exit 1
fi
shell :
bash
- name : Verify any_deleted files comma separator on non windows platform
if : "!contains(steps.changed-files-specific-pipe.outputs.deleted_files, 'action.yml') && !contains(steps.changed-files-specific-pipe.outputs.deleted_files, '.github/workflows/test.yml') && runner.os != 'Windows'"
run : |
if [[ "${{ steps.changed-files-specific-pipe.outputs.any_deleted }}" != "false" ]]; then
echo "Invalid output: Expected (false) got (${{ steps.changed-files-specific-pipe.outputs.any_deleted }})"
exit 1
fi
shell :
bash
- name : Verify any_deleted files comma separator on windows platform
if : "!contains(steps.changed-files-specific-pipe.outputs.deleted_files, 'action.yml') && !contains(steps.changed-files-specific-pipe.outputs.deleted_files, '.github\\workflows\\test.yml') && runner.os == 'Windows'"
2021-09-05 08:22:47 -04:00
run : |
if [[ "${{ steps.changed-files-specific-pipe.outputs.any_deleted }}" != "false" ]]; then
echo "Invalid output: Expected (false) got (${{ steps.changed-files-specific-pipe.outputs.any_deleted }})"
exit 1
fi
shell :
bash
2021-09-04 09:08:20 -04:00
- name : Run changed-files with specific files forward slash separator
id : changed-files-specific-forward-slash
uses : ./
with :
files : |
.github/workflows/test.yml
action.yml
separator : "/"
- name : Show output
run : |
echo '${{ toJSON(steps.changed-files-specific-forward-slash.outputs) }}'
shell :
bash
2023-08-22 22:06:23 -06:00
- name : Verify any_changed files forward slash separator on non windows platform
if : "!contains(steps.changed-files-specific-forward-slash.outputs.all_changed_files, 'action.yml') && !contains(steps.changed-files-specific-forward-slash.outputs.all_changed_files, '.github/workflows/test.yml') && runner.os != 'Windows'"
2021-07-17 10:51:08 -04:00
run : |
2022-02-17 02:35:49 -05:00
if [[ "${{ steps.changed-files-specific-forward-slash.outputs.any_changed }}" != "false" ]]; then
2021-09-04 09:08:20 -04:00
echo "Invalid output: Expected (false) got (${{ steps.changed-files-specific-forward-slash.outputs.any_changed }})"
2021-07-17 10:51:08 -04:00
exit 1
fi
shell :
bash
2023-08-22 22:06:23 -06:00
- name : Verify any_changed files forward slash separator on windows platform
if : "!contains(steps.changed-files-specific-forward-slash.outputs.all_changed_files, 'action.yml') && !contains(steps.changed-files-specific-forward-slash.outputs.all_changed_files, '.github\\workflows\\test.yml') && runner.os == 'Windows'"
run : |
if [[ "${{ steps.changed-files-specific-forward-slash.outputs.any_changed }}" != "false" ]]; then
echo "Invalid output: Expected (false) got (${{ steps.changed-files-specific-forward-slash.outputs.any_changed }})"
exit 1
fi
shell :
bash
- name : Verify any_modified files forward slash separator on non windows platform
if : "!contains(steps.changed-files-specific-forward-slash.outputs.all_modified_files, 'action.yml') && !contains(steps.changed-files-specific-forward-slash.outputs.all_modified_files, '.github/workflows/test.yml') && runner.os != 'Windows'"
run : |
if [[ "${{ steps.changed-files-specific-forward-slash.outputs.any_modified }}" != "false" ]]; then
echo "Invalid output: Expected (false) got (${{ steps.changed-files-specific-forward-slash.outputs.any_modified }})"
exit 1
fi
shell :
bash
- name : Verify any_modified files forward slash separator on windows platform
if : "!contains(steps.changed-files-specific-forward-slash.outputs.all_modified_files, 'action.yml') && !contains(steps.changed-files-specific-forward-slash.outputs.all_modified_files, '.github\\workflows\\test.yml') && runner.os == 'Windows'"
2021-12-14 02:01:31 -05:00
run : |
2022-02-17 02:35:49 -05:00
if [[ "${{ steps.changed-files-specific-forward-slash.outputs.any_modified }}" != "false" ]]; then
2021-12-14 02:01:31 -05:00
echo "Invalid output: Expected (false) got (${{ steps.changed-files-specific-forward-slash.outputs.any_modified }})"
exit 1
fi
shell :
bash
2023-08-22 22:06:23 -06:00
- name : Verify any_deleted files forward slash separator on non windows platform
if : "!contains(steps.changed-files-specific-forward-slash.outputs.deleted_files, 'action.yml') && !contains(steps.changed-files-specific-forward-slash.outputs.deleted_files, '.github/workflows/test.yml') && runner.os != 'Windows'"
run : |
if [[ "${{ steps.changed-files-specific-forward-slash.outputs.any_deleted }}" != "false" ]]; then
echo "Invalid output: Expected (false) got (${{ steps.changed-files-specific-forward-slash.outputs.any_deleted }})"
exit 1
fi
shell :
bash
- name : Verify any_deleted files forward slash separator on windows platform
if : "!contains(steps.changed-files-specific-forward-slash.outputs.deleted_files, 'action.yml') && !contains(steps.changed-files-specific-forward-slash.outputs.deleted_files, '.github\\workflows\\test.yml') && runner.os == 'Windows'"
2021-09-05 08:22:47 -04:00
run : |
2022-02-17 02:35:49 -05:00
if [[ "${{ steps.changed-files-specific-forward-slash.outputs.any_deleted }}" != "false" ]]; then
2021-09-05 08:22:47 -04:00
echo "Invalid output: Expected (false) got (${{ steps.changed-files-specific-forward-slash.outputs.any_deleted }})"
exit 1
fi
shell :
bash
2021-07-17 10:51:08 -04:00
- name : Run changed-files with specific files from a source file
id : changed-files-specific-source-file
uses : ./
with :
2021-07-17 11:46:59 -04:00
files_from_source_file : |
2021-07-17 10:51:08 -04:00
test/changed-files-list.txt
test/changed-files-list.txt
files : |
2022-03-29 14:18:12 -04:00
**/workflows/greetings.yml
2023-08-22 22:06:23 -06:00
- name : Show output
run : |
echo '${{ toJSON(steps.changed-files-specific-source-file.outputs) }}'
shell :
bash
- name : Check if a excluded file is not included in any_changed on non windows platform
if : "contains(steps.changed-files-specific-source-file.outputs.all_changed_files, 'test/test/test.txt') && runner.os != 'Windows'"
2022-01-25 10:50:47 +09:00
run : |
2022-01-26 12:41:38 +09:00
echo "Invalid output: Expected not to include (test/test/test.txt) got (${{ steps.changed-files-specific-source-file.outputs.all_changed_files }})"
2022-01-25 10:50:47 +09:00
exit 1
shell :
bash
2023-08-22 22:06:23 -06:00
- name : Check if a excluded file is not included in any_changed on windows platform
if : "contains(steps.changed-files-specific-source-file.outputs.all_changed_files, 'test\\test\\test.txt') && runner.os == 'Windows'"
run : |
echo "Invalid output: Expected not to include (test\\test\\test.txt) got (${{ steps.changed-files-specific-source-file.outputs.all_changed_files }})"
exit 1
shell :
bash
- name : Verify any_changed from source files on non windows platform
2021-10-15 13:36:09 -04:00
if : |
(
2021-12-14 00:21:49 -05:00
!contains(steps.changed-files-specific-source-file.outputs.all_changed_files, 'action.yml') &&
!contains(steps.changed-files-specific-source-file.outputs.all_changed_files, '.github/workflows/test.yml') &&
2023-01-18 16:35:50 -07:00
!contains(steps.changed-files-specific-source-file.outputs.all_changed_files, 'test/test.txt') &&
!contains(steps.changed-files-specific-source-file.outputs.all_changed_files, 'test/test2/test.txt') &&
!contains(steps.changed-files-specific-source-file.outputs.all_changed_files, 'test/test2/test3/test4/test.txt') &&
!contains(steps.changed-files-specific-source-file.outputs.all_changed_files, '[test new].txt') &&
2023-08-22 22:06:23 -06:00
!contains(steps.changed-files-specific-source-file.outputs.all_changed_files, '.github/workflows/greetings.yml') &&
runner.os != 'Windows'
2021-10-15 13:36:09 -04:00
)
2021-07-17 10:51:08 -04:00
run : |
2021-09-04 09:08:20 -04:00
if [[ "${{ steps.changed-files-specific-source-file.outputs.any_changed }}" != "false" ]]; then
echo "Invalid output: Expected (false) got (${{ steps.changed-files-specific-source-file.outputs.any_changed }})"
2021-07-17 10:51:08 -04:00
exit 1
fi
shell :
bash
2023-08-22 22:06:23 -06:00
- name : Check if a excluded file is not included in any_modified on non windows platform
if : "contains(steps.changed-files-specific-source-file.outputs.all_modified_files, 'test/test/test.txt') && runner.os != 'Windows'"
2022-01-25 10:50:47 +09:00
run : |
2022-01-26 12:41:38 +09:00
echo "Invalid output: Expected not to include (test/test/test.txt) got (${{ steps.changed-files-specific-source-file.outputs.all_modified_files }})"
2022-01-25 10:50:47 +09:00
exit 1
shell :
bash
2023-08-22 22:06:23 -06:00
- name : Check if a excluded file is not included in any_modified on windows platform
if : "contains(steps.changed-files-specific-source-file.outputs.all_modified_files, 'test\\test\\test.txt') && runner.os == 'Windows'"
run : |
echo "Invalid output: Expected not to include (test\\test\\test.txt) got (${{ steps.changed-files-specific-source-file.outputs.all_modified_files }})"
exit 1
shell :
bash
- name : Verify any_modified from source files on non windows platform
2021-12-14 02:01:31 -05:00
if : |
(
!contains(steps.changed-files-specific-source-file.outputs.all_modified_files, 'action.yml') &&
!contains(steps.changed-files-specific-source-file.outputs.all_modified_files, '.github/workflows/test.yml') &&
2023-01-18 16:35:50 -07:00
!contains(steps.changed-files-specific-source-file.outputs.all_modified_files, 'test/test.txt') &&
!contains(steps.changed-files-specific-source-file.outputs.all_modified_files, 'test/test2/test.txt') &&
!contains(steps.changed-files-specific-source-file.outputs.all_modified_files, 'test/test2/test3/test4/test.txt') &&
!contains(steps.changed-files-specific-source-file.outputs.all_modified_files, '[test new].txt') &&
2023-08-22 22:06:23 -06:00
!contains(steps.changed-files-specific-source-file.outputs.all_modified_files, '.github/workflows/greetings.yml') &&
runner.os != 'Windows'
2021-12-14 02:01:31 -05:00
)
run : |
if [[ "${{ steps.changed-files-specific-source-file.outputs.any_modified }}" != "false" ]]; then
echo "Invalid output: Expected (false) got (${{ steps.changed-files-specific-source-file.outputs.any_modified }})"
exit 1
fi
shell :
bash
2023-08-22 22:06:23 -06:00
- name : Check if a excluded file is not included in any_deleted on non windows platform
if : "contains(steps.changed-files-specific-source-file.outputs.deleted_files, 'test/test/test.txt') && runner.os != 'Windows'"
2022-01-25 10:50:47 +09:00
run : |
2022-01-26 12:41:38 +09:00
echo "Invalid output: Expected not to include (test/test/test.txt) got (${{ steps.changed-files-specific-source-file.outputs.deleted_files }})"
2022-01-25 10:50:47 +09:00
exit 1
shell :
bash
2023-08-22 22:06:23 -06:00
- name : Check if a excluded file is not included in any_deleted on windows platform
if : contains(steps.changed-files-specific-source-file.outputs.deleted_files, 'test\\test\\test.txt')
run : |
echo "Invalid output: Expected not to include (test\\test\\test.txt) got (${{ steps.changed-files-specific-source-file.outputs.deleted_files }})"
exit 1
shell :
bash
- name : Verify any_deleted from source files on non windows platform
2023-01-18 16:35:50 -07:00
if : |
(
!contains(steps.changed-files-specific-source-file.outputs.deleted_files, 'action.yml') &&
!contains(steps.changed-files-specific-source-file.outputs.deleted_files, '.github/workflows/test.yml') &&
!contains(steps.changed-files-specific-source-file.outputs.deleted_files, 'test/test.txt') &&
!contains(steps.changed-files-specific-source-file.outputs.deleted_files, 'test/test2/test.txt') &&
!contains(steps.changed-files-specific-source-file.outputs.deleted_files, 'test/test2/test3/test4/test.txt') &&
!contains(steps.changed-files-specific-source-file.outputs.deleted_files, '[test new].txt') &&
2023-08-22 22:06:23 -06:00
!contains(steps.changed-files-specific-source-file.outputs.deleted_files, '.github/workflows/greetings.yml') &&
runner.os != 'Windows'
2023-01-18 16:35:50 -07:00
)
2021-09-05 08:22:47 -04:00
run : |
if [[ "${{ steps.changed-files-specific-source-file.outputs.any_deleted }}" != "false" ]]; then
echo "Invalid output: Expected (false) got (${{ steps.changed-files-specific-source-file.outputs.any_deleted }})"
exit 1
fi
shell :
bash
2021-07-17 10:51:08 -04:00
- name : Show output
run : |
2021-09-04 09:08:20 -04:00
echo '${{ toJSON(steps.changed-files-specific-source-file.outputs) }}'
2021-07-17 10:51:08 -04:00
shell :
bash
- name : Run changed-files with specific files from a source file using a comma separator
id : changed-files-specific-comma-source-file
uses : ./
with :
2021-07-17 11:46:59 -04:00
files_from_source_file : |
2021-07-17 10:51:08 -04:00
test/changed-files-list.txt
separator : ","
2021-09-05 08:22:47 -04:00
- name : Show output
run : |
echo '${{ toJSON(steps.changed-files-specific-comma-source-file.outputs) }}'
shell :
bash
2023-08-22 22:06:23 -06:00
- name : Verify any_changed files comma separator from source files on non windows platform
2023-01-18 16:35:50 -07:00
if : |
(
!contains(steps.changed-files-specific-comma-source-file.outputs.all_changed_files, 'action.yml') &&
!contains(steps.changed-files-specific-comma-source-file.outputs.all_changed_files, '.github/workflows/test.yml') &&
!contains(steps.changed-files-specific-comma-source-file.outputs.all_changed_files, 'test/test.txt') &&
!contains(steps.changed-files-specific-comma-source-file.outputs.all_changed_files, 'test/test2/test.txt') &&
!contains(steps.changed-files-specific-comma-source-file.outputs.all_changed_files, 'test/test2/test3/test4/test.txt') &&
2023-08-22 22:06:23 -06:00
!contains(steps.changed-files-specific-comma-source-file.outputs.all_changed_files, '[test new].txt') &&
runner.os != 'Windows'
2023-01-18 16:35:50 -07:00
)
2021-05-17 04:02:50 -04:00
run : |
2021-09-04 09:08:20 -04:00
if [[ "${{ steps.changed-files-specific-comma-source-file.outputs.any_changed }}" != "false" ]]; then
echo "Invalid output: Expected (false) got (${{ steps.changed-files-specific-comma-source-file.outputs.any_changed }})"
2021-05-17 04:02:50 -04:00
exit 1
fi
2021-06-18 10:19:28 -04:00
shell :
bash
2023-08-22 22:06:23 -06:00
- name : Verify any_modified files comma separator from source files on non windows platform
2023-01-18 16:35:50 -07:00
if : |
(
!contains(steps.changed-files-specific-comma-source-file.outputs.all_modified_files, 'action.yml') &&
!contains(steps.changed-files-specific-comma-source-file.outputs.all_modified_files, '.github/workflows/test.yml') &&
!contains(steps.changed-files-specific-comma-source-file.outputs.all_modified_files, 'test/test.txt') &&
!contains(steps.changed-files-specific-comma-source-file.outputs.all_modified_files, 'test/test2/test.txt') &&
!contains(steps.changed-files-specific-comma-source-file.outputs.all_modified_files, 'test/test2/test3/test4/test.txt') &&
2023-08-22 22:06:23 -06:00
!contains(steps.changed-files-specific-comma-source-file.outputs.all_modified_files, '[test new].txt') &&
runner.os != 'Windows'
2023-01-18 16:35:50 -07:00
)
2021-12-14 02:01:31 -05:00
run : |
if [[ "${{ steps.changed-files-specific-comma-source-file.outputs.any_modified }}" != "false" ]]; then
echo "Invalid output: Expected (false) got (${{ steps.changed-files-specific-comma-source-file.outputs.any_modified }})"
exit 1
fi
shell :
bash
2021-12-04 07:00:44 -05:00
- name : Get branch name
id : branch-name
2023-05-15 21:42:10 +00:00
uses : tj-actions/branch-names@v7
2022-12-18 22:12:33 -07:00
if : github.event_name == 'pull_request' && matrix.fetch-depth == 0
2023-10-09 15:18:59 -06:00
- uses : nrwl/nx-set-shas@v4
2021-12-04 07:00:44 -05:00
id : last_successful_commit
2022-12-18 22:12:33 -07:00
if : github.event_name == 'pull_request' && github.event.action != 'closed' && matrix.fetch-depth == 0
2021-12-04 07:00:44 -05:00
with :
2022-11-23 15:02:10 -07:00
main-branch-name : ${{ steps.branch-name.outputs.base_ref_branch }}
workflow-id : 'test.yml'
2021-07-17 11:46:59 -04:00
- name : Run changed-files with a custom base sha
2023-06-08 06:56:26 -06:00
if : github.event_name != 'push' && github.event.action != 'closed' && matrix.fetch-depth == 0 && steps.last_successful_commit.outputs.base != steps.last_successful_commit.outputs.head
2021-07-17 11:46:59 -04:00
id : changed-files-custom-base-sha
uses : ./
with :
2022-11-23 15:02:10 -07:00
base_sha : ${{ steps.last_successful_commit.outputs.base }}
2021-07-17 11:46:59 -04:00
- name : Show output
2022-12-18 22:12:33 -07:00
if : github.event_name == 'pull_request' && github.event.action != 'closed' && matrix.fetch-depth == 0
2021-07-17 11:46:59 -04:00
run : |
2021-09-04 09:08:20 -04:00
echo '${{ toJSON(steps.changed-files-custom-base-sha.outputs) }}'
2021-07-17 11:46:59 -04:00
shell :
bash
2023-01-11 13:58:50 -07:00
- name : Run changed-files with custom sha
id : changed-files-custom-sha
if : github.event_name == 'pull_request' && github.event.action != 'closed'
uses : ./
with :
sha : ${{ github.event.pull_request.head.sha }}
- name : Show output
if : github.event.action != 'closed'
run : |
echo '${{ toJSON(steps.changed-files-custom-sha.outputs) }}'
shell :
bash
- name : Run changed-files with the pull request base sha and head sha
id : changed-files-pull-request-base-sha-head-sha
if : github.event_name == 'pull_request' && github.event.action != 'closed'
uses : ./
with :
base_sha : ${{ github.event.pull_request.base.sha }}
sha : ${{ github.event.pull_request.head.sha }}
- name : Show output
if : github.event.action != 'closed'
run : |
echo '${{ toJSON(steps.changed-files-pull-request-base-sha-head-sha.outputs) }}'
shell :
bash
2021-07-17 15:13:26 -04:00
- name : Run changed-files with specific files (only-changed)
id : changed-files-specific-only-changed
uses : ./
with :
files : |
2022-01-04 21:38:03 -05:00
.github/**/test.yml
2021-07-17 15:13:26 -04:00
- name : Verify only_changed files
if : steps.changed-files-specific-only-changed.outputs.other_changed_files != ''
run : |
if [[ "${{ steps.changed-files-specific-only-changed.outputs.only_changed }}" != "false" ]]; then
echo "Invalid output: Expected (false) got (${{ steps.changed-files-specific-only-changed.outputs.only_changed }})"
exit 1
fi
shell :
bash
2021-09-05 08:22:47 -04:00
- name : Verify only_deleted files
if : steps.changed-files-specific-only-changed.outputs.other_deleted_files != ''
run : |
if [[ "${{ steps.changed-files-specific-only-changed.outputs.only_deleted }}" != "false" ]]; then
2022-02-01 22:30:40 -05:00
echo "Invalid output: Expected (false) got (${{ steps.changed-files-specific-only-changed.outputs.only_deleted }})."
2021-09-05 08:22:47 -04:00
exit 1
fi
shell :
bash
2021-07-17 15:13:26 -04:00
- name : Show output
run : |
2021-09-04 09:08:20 -04:00
echo '${{ toJSON(steps.changed-files-specific-only-changed.outputs) }}'
2021-07-17 15:13:26 -04:00
shell :
bash