mirror of
				https://github.com/actions/cache.git
				synced 2025-11-04 15:48:39 +08:00 
			
		
		
		
	replace deprecated set-output command in workflow.yml, README and the examples file
This commit is contained in:
		
							parent
							
								
									a3f5edc237
								
							
						
					
					
						commit
						f066901d82
					
				
							
								
								
									
										2
									
								
								.github/workflows/workflow.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.github/workflows/workflow.yml
									
									
									
									
										vendored
									
									
								
							| 
						 | 
					@ -28,7 +28,7 @@ jobs:
 | 
				
			||||||
    - name: Determine npm cache directory
 | 
					    - name: Determine npm cache directory
 | 
				
			||||||
      id: npm-cache
 | 
					      id: npm-cache
 | 
				
			||||||
      run: |
 | 
					      run: |
 | 
				
			||||||
        echo "::set-output name=dir::$(npm config get cache)"
 | 
					        echo "dir=$(npm config get cache)" >> $GITHUB_OUTPUT
 | 
				
			||||||
    - name: Restore npm cache
 | 
					    - name: Restore npm cache
 | 
				
			||||||
      uses: actions/cache@v3
 | 
					      uses: actions/cache@v3
 | 
				
			||||||
      with:
 | 
					      with:
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -135,7 +135,7 @@ Additionally, you can use arbitrary command output in a cache key, such as a dat
 | 
				
			||||||
  - name: Get Date
 | 
					  - name: Get Date
 | 
				
			||||||
    id: get-date
 | 
					    id: get-date
 | 
				
			||||||
    run: |
 | 
					    run: |
 | 
				
			||||||
      echo "::set-output name=date::$(/bin/date -u "+%Y%m%d")"
 | 
					      echo "date=$(/bin/date -u "+%Y%m%d")" >> $GITHUB_OUTPUT
 | 
				
			||||||
    shell: bash
 | 
					    shell: bash
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  - uses: actions/cache@v3
 | 
					  - uses: actions/cache@v3
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										10
									
								
								examples.md
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								examples.md
									
									
									
									
									
								
							| 
						 | 
					@ -316,7 +316,7 @@ If using `npm config` to retrieve the cache directory, ensure you run [actions/s
 | 
				
			||||||
- name: Get npm cache directory
 | 
					- name: Get npm cache directory
 | 
				
			||||||
  id: npm-cache-dir
 | 
					  id: npm-cache-dir
 | 
				
			||||||
  run: |
 | 
					  run: |
 | 
				
			||||||
    echo "::set-output name=dir::$(npm config get cache)"
 | 
					    echo "dir=$(npm config get cache)" >> $GITHUB_OUTPUT
 | 
				
			||||||
- uses: actions/cache@v3
 | 
					- uses: actions/cache@v3
 | 
				
			||||||
  id: npm-cache # use this to check for `cache-hit` ==> if: steps.npm-cache.outputs.cache-hit != 'true'
 | 
					  id: npm-cache # use this to check for `cache-hit` ==> if: steps.npm-cache.outputs.cache-hit != 'true'
 | 
				
			||||||
  with:
 | 
					  with:
 | 
				
			||||||
| 
						 | 
					@ -342,7 +342,7 @@ The yarn cache directory will depend on your operating system and version of `ya
 | 
				
			||||||
```yaml
 | 
					```yaml
 | 
				
			||||||
- name: Get yarn cache directory path
 | 
					- name: Get yarn cache directory path
 | 
				
			||||||
  id: yarn-cache-dir-path
 | 
					  id: yarn-cache-dir-path
 | 
				
			||||||
  run: echo "::set-output name=dir::$(yarn cache dir)"
 | 
					  run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
 | 
				
			||||||
 | 
					
 | 
				
			||||||
- uses: actions/cache@v3
 | 
					- uses: actions/cache@v3
 | 
				
			||||||
  id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
 | 
					  id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
 | 
				
			||||||
| 
						 | 
					@ -360,7 +360,7 @@ The yarn 2 cache directory will depend on your config. See https://yarnpkg.com/c
 | 
				
			||||||
```yaml
 | 
					```yaml
 | 
				
			||||||
- name: Get yarn cache directory path
 | 
					- name: Get yarn cache directory path
 | 
				
			||||||
  id: yarn-cache-dir-path
 | 
					  id: yarn-cache-dir-path
 | 
				
			||||||
  run: echo "::set-output name=dir::$(yarn config get cacheFolder)"
 | 
					  run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
 | 
				
			||||||
 | 
					
 | 
				
			||||||
- uses: actions/cache@v3
 | 
					- uses: actions/cache@v3
 | 
				
			||||||
  id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
 | 
					  id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
 | 
				
			||||||
| 
						 | 
					@ -405,7 +405,7 @@ Esy allows you to export built dependencies and import pre-built dependencies.
 | 
				
			||||||
- name: Get Composer Cache Directory
 | 
					- name: Get Composer Cache Directory
 | 
				
			||||||
  id: composer-cache
 | 
					  id: composer-cache
 | 
				
			||||||
  run: |
 | 
					  run: |
 | 
				
			||||||
    echo "::set-output name=dir::$(composer config cache-files-dir)"
 | 
					    echo "dir::$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
 | 
				
			||||||
- uses: actions/cache@v3
 | 
					- uses: actions/cache@v3
 | 
				
			||||||
  with:
 | 
					  with:
 | 
				
			||||||
    path: ${{ steps.composer-cache.outputs.dir }}
 | 
					    path: ${{ steps.composer-cache.outputs.dir }}
 | 
				
			||||||
| 
						 | 
					@ -497,7 +497,7 @@ jobs:
 | 
				
			||||||
- name: Get pip cache dir
 | 
					- name: Get pip cache dir
 | 
				
			||||||
  id: pip-cache
 | 
					  id: pip-cache
 | 
				
			||||||
  run: |
 | 
					  run: |
 | 
				
			||||||
    echo "::set-output name=dir::$(pip cache dir)"
 | 
					    echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT
 | 
				
			||||||
 | 
					
 | 
				
			||||||
- name: pip cache
 | 
					- name: pip cache
 | 
				
			||||||
  uses: actions/cache@v3
 | 
					  uses: actions/cache@v3
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user