3
0
Fork 0
mirror of https://github.com/tj-actions/changed-files synced 2024-12-17 13:47:20 +00:00
changed-files/.github/workflows/test.yml
2021-04-23 06:17:20 -04:00

42 lines
1.1 KiB
YAML

name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
test:
runs-on: ubuntu-latest
name: Test changed-files
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Run changed-files with defaults
id: changed-files
uses: ./
- name: Show output
run: |
echo "${{ toJSON(steps.changed-files.outputs) }}"
- name: List all modified files
run: |
for file in "${{ steps.changed-files.outputs.modified_files }}"; do
echo $file
done
- name: Run step when README.md changes
if: contains(steps.changed-files.outputs.modified_files, 'README.md')
run: |
echo "Your README.md has been modified ${{ steps.changed-files.outputs.modified_files }}."
- name: Run changed-files with comma separator
id: changed-files-comma
uses: ./
with:
separator: ","
- name: Show output
run: |
echo "${{ toJSON(steps.changed-files-comma.outputs) }}"