mirror of
				https://github.com/actions/checkout.git
				synced 2025-10-31 13:58:09 +08:00 
			
		
		
		
	Add objectFormat setting to allow init()ing a repo with sha256
This commit is contained in:
		
							
								
								
									
										14
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										14
									
								
								README.md
									
									
									
									
									
								
							| @@ -126,6 +126,11 @@ Please refer to the [release page](https://github.com/actions/checkout/releases/ | ||||
|     # running from unless specified. Example URLs are https://github.com or | ||||
|     # https://my-ghes-server.example.com | ||||
|     github-server-url: '' | ||||
|  | ||||
|     # Use the given object format when creating local repository. Specifically, use | ||||
|     # 'sha256' to checkout a SHA-256 repository. | ||||
|     # Default: null | ||||
|     object-format: '' | ||||
| ``` | ||||
| <!-- end usage --> | ||||
|  | ||||
| @@ -144,6 +149,7 @@ Please refer to the [release page](https://github.com/actions/checkout/releases/ | ||||
| - [Checkout pull request on closed event](#Checkout-pull-request-on-closed-event) | ||||
| - [Push a commit using the built-in token](#Push-a-commit-using-the-built-in-token) | ||||
| - [Push a commit to a PR using the built-in token](#Push-a-commit-to-a-PR-using-the-built-in-token) | ||||
| - [Checkout SHA-256 repository](#checkout-sha-256-repository) | ||||
|  | ||||
| ## Fetch only the root files | ||||
|  | ||||
| @@ -323,6 +329,14 @@ permissions: | ||||
|   contents: read | ||||
| ``` | ||||
|  | ||||
| ## Checkout SHA-256 repository | ||||
|  | ||||
| ```yaml | ||||
| - uses: actions/checkout@v4 | ||||
|   with: | ||||
|     object-format: sha256 | ||||
| ``` | ||||
|  | ||||
| # License | ||||
|  | ||||
| The scripts and documentation in this project are released under the [MIT License](LICENSE) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user