Update README.md
This commit is contained in:
		
							parent
							
								
									6a0c3909aa
								
							
						
					
					
						commit
						c306da633c
					
				
							
								
								
									
										18
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										18
									
								
								README.md
									
									
									
									
									
								
							| @ -66,12 +66,12 @@ jobs: | |||||||
|           fetch-depth: 0  # OR "2" -> To retrieve the preceding commit. |           fetch-depth: 0  # OR "2" -> To retrieve the preceding commit. | ||||||
|        |        | ||||||
|       - name: Get changed files |       - name: Get changed files | ||||||
|         id: changed_files |         id: changed-files | ||||||
|         uses: tj-actions/changed-files@v4.2 |         uses: tj-actions/changed-files@v4.2 | ||||||
|        |        | ||||||
|       - name: List all modified files |       - name: List all modified files | ||||||
|         run: | |         run: | | ||||||
|           for file in "${{ steps.changed_files.outputs.all_modified_files }}"; do |           for file in "${{ steps.changed-files.outputs.all_modified_files }}"; do | ||||||
|             echo "$file was modified" |             echo "$file was modified" | ||||||
|           done |           done | ||||||
| ``` | ``` | ||||||
| @ -84,28 +84,28 @@ jobs: | |||||||
|     steps: |     steps: | ||||||
|       - uses: actions/checkout@v2 |       - uses: actions/checkout@v2 | ||||||
|       - name: Get changed files using defaults |       - name: Get changed files using defaults | ||||||
|         id: changed_files |         id: changed-files | ||||||
|         uses: tj-actions/changed-files@v4.2 |         uses: tj-actions/changed-files@v4.2 | ||||||
|        |        | ||||||
|       - name: Get changed files using a comma separator |       - name: Get changed files using a comma separator | ||||||
|         id: changed_files_comma |         id: changed-files-comma | ||||||
|         uses: tj-actions/changed-files@v4.2 |         uses: tj-actions/changed-files@v4.2 | ||||||
|         with: |         with: | ||||||
|           separator: "," |           separator: "," | ||||||
|         |         | ||||||
|       - name: List all added files |       - name: List all added files | ||||||
|         run: | |         run: | | ||||||
|           for file in "${{ steps.changed_files.outputs.added_files }}"; do |           for file in "${{ steps.changed-files.outputs.added_files }}"; do | ||||||
|             echo "$file was added" |             echo "$file was added" | ||||||
|           done |           done | ||||||
|            |            | ||||||
|       - name: Run step when a file changes |       - name: Run step when a file changes | ||||||
|         if: contains(steps.changed_files.outputs.modified_files, 'my-file.txt') |         if: contains(steps.changed-files.outputs.modified_files, 'my-file.txt') | ||||||
|         run: | |         run: | | ||||||
|             echo "Your file my-file.txt has been modified." |             echo "Your file my-file.txt has been modified." | ||||||
| 
 | 
 | ||||||
|       - name: Run step when a file has been deleted |       - name: Run step when a file has been deleted | ||||||
|         if: contains(steps.changed_files.outputs.deleted_files, 'test.txt') |         if: contains(steps.changed-files.outputs.deleted_files, 'test.txt') | ||||||
|         run: | |         run: | | ||||||
|             echo "Your test.txt has been deleted." |             echo "Your test.txt has been deleted." | ||||||
|              |              | ||||||
| @ -122,13 +122,13 @@ jobs: | |||||||
|           fetch-depth: 0  # otherwise, you will fail to push refs to dest repo |           fetch-depth: 0  # otherwise, you will fail to push refs to dest repo | ||||||
|        |        | ||||||
|       - name: Get changed files |       - name: Get changed files | ||||||
|         id: changed_files |         id: changed-files | ||||||
|         uses: tj-actions/changed-files@v4.2 |         uses: tj-actions/changed-files@v4.2 | ||||||
| 
 | 
 | ||||||
|       - name: Pre-commit |       - name: Pre-commit | ||||||
|         uses: pre-commit/action@v2.0.0 |         uses: pre-commit/action@v2.0.0 | ||||||
|         with: |         with: | ||||||
|           extra_args: -v --hook-stage push --files ${{ steps.changed_files.outputs.all_modified_files }} |           extra_args: -v --hook-stage push --files ${{ steps.changed-files.outputs.all_modified_files }} | ||||||
|           token: ${{ secrets.github_token }} |           token: ${{ secrets.github_token }} | ||||||
| ``` | ``` | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Tonye Jack
						Tonye Jack