mirror of
				https://hub.gitmirror.com/https://github.com/gradle/actions.git
				synced 2025-10-30 01:20:05 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			41 lines
		
	
	
		
			1.0 KiB
		
	
	
	
		
			YAML
		
	
	
	
	
	
			
		
		
	
	
			41 lines
		
	
	
		
			1.0 KiB
		
	
	
	
		
			YAML
		
	
	
	
	
	
| name: CI-check-no-dist-update
 | |
| 
 | |
| # Prohibit any change to 'dist/**' on a non-release branch
 | |
| on:
 | |
|   workflow_dispatch:
 | |
|   pull_request:
 | |
|     paths:
 | |
|       - 'dist/**'
 | |
| 
 | |
| permissions:
 | |
|   contents: read
 | |
| 
 | |
| jobs:
 | |
|   fail-on-dist-update:
 | |
|     runs-on: ubuntu-latest
 | |
|     steps:
 | |
|     - name: Checkout sources
 | |
|       uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
 | |
|       with:
 | |
|         fetch-depth: 0
 | |
| 
 | |
|     - name: Get changed files
 | |
|       id: changed-files
 | |
|       uses: tj-actions/changed-files@4edd678ac3f81e2dc578756871e4d00c19191daf # v45.0.4
 | |
|       with:
 | |
|         files: |
 | |
|           dist/**
 | |
| 
 | |
|     - name: Print changes to dist directory
 | |
|       env:
 | |
|         ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
 | |
|       run: |
 | |
|         for file in ${ALL_CHANGED_FILES}; do
 | |
|           echo "$file was changed"
 | |
|         done
 | |
| 
 | |
|     - run: |
 | |
|         echo "The 'dist' directory is automatically updated by the release process."
 | |
|         echo "It should not be updated manually in a non-release branch or a pull request."
 | |
|         exit 1
 | 
