mirror of
				https://code.forgejo.org/actions/checkout.git
				synced 2025-11-04 14:49:12 +00:00 
			
		
		
		
	Merge 0dcc70b094 into ff7abcd0c3
				
					
				
			This commit is contained in:
		
						commit
						28a776ffd3
					
				
					 4 changed files with 5 additions and 29 deletions
				
			
		
							
								
								
									
										22
									
								
								package-lock.json
									
										
									
										generated
									
									
									
								
							
							
						
						
									
										22
									
								
								package-lock.json
									
										
									
										generated
									
									
									
								
							| 
						 | 
					@ -13,13 +13,11 @@
 | 
				
			||||||
        "@actions/exec": "^1.1.1",
 | 
					        "@actions/exec": "^1.1.1",
 | 
				
			||||||
        "@actions/github": "^6.0.0",
 | 
					        "@actions/github": "^6.0.0",
 | 
				
			||||||
        "@actions/io": "^1.1.3",
 | 
					        "@actions/io": "^1.1.3",
 | 
				
			||||||
        "@actions/tool-cache": "^2.0.1",
 | 
					        "@actions/tool-cache": "^2.0.1"
 | 
				
			||||||
        "uuid": "^9.0.1"
 | 
					 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
      "devDependencies": {
 | 
					      "devDependencies": {
 | 
				
			||||||
        "@types/jest": "^29.5.12",
 | 
					        "@types/jest": "^29.5.12",
 | 
				
			||||||
        "@types/node": "^24.1.0",
 | 
					        "@types/node": "^24.1.0",
 | 
				
			||||||
        "@types/uuid": "^9.0.8",
 | 
					 | 
				
			||||||
        "@typescript-eslint/eslint-plugin": "^7.9.0",
 | 
					        "@typescript-eslint/eslint-plugin": "^7.9.0",
 | 
				
			||||||
        "@typescript-eslint/parser": "^7.9.0",
 | 
					        "@typescript-eslint/parser": "^7.9.0",
 | 
				
			||||||
        "@vercel/ncc": "^0.38.1",
 | 
					        "@vercel/ncc": "^0.38.1",
 | 
				
			||||||
| 
						 | 
					@ -1529,12 +1527,6 @@
 | 
				
			||||||
      "integrity": "sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw==",
 | 
					      "integrity": "sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw==",
 | 
				
			||||||
      "dev": true
 | 
					      "dev": true
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    "node_modules/@types/uuid": {
 | 
					 | 
				
			||||||
      "version": "9.0.8",
 | 
					 | 
				
			||||||
      "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-9.0.8.tgz",
 | 
					 | 
				
			||||||
      "integrity": "sha512-jg+97EGIcY9AGHJJRaaPVgetKDsrTgbRjQ5Msgjh/DQKEFl0DtyRr/VCOyD1T2R1MNeWPK/u7JoGhlDZnKBAfA==",
 | 
					 | 
				
			||||||
      "dev": true
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    "node_modules/@types/yargs": {
 | 
					    "node_modules/@types/yargs": {
 | 
				
			||||||
      "version": "17.0.32",
 | 
					      "version": "17.0.32",
 | 
				
			||||||
      "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.32.tgz",
 | 
					      "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.32.tgz",
 | 
				
			||||||
| 
						 | 
					@ -6914,18 +6906,6 @@
 | 
				
			||||||
        "punycode": "^2.1.0"
 | 
					        "punycode": "^2.1.0"
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    "node_modules/uuid": {
 | 
					 | 
				
			||||||
      "version": "9.0.1",
 | 
					 | 
				
			||||||
      "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz",
 | 
					 | 
				
			||||||
      "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==",
 | 
					 | 
				
			||||||
      "funding": [
 | 
					 | 
				
			||||||
        "https://github.com/sponsors/broofa",
 | 
					 | 
				
			||||||
        "https://github.com/sponsors/ctavan"
 | 
					 | 
				
			||||||
      ],
 | 
					 | 
				
			||||||
      "bin": {
 | 
					 | 
				
			||||||
        "uuid": "dist/bin/uuid"
 | 
					 | 
				
			||||||
      }
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    "node_modules/v8-to-istanbul": {
 | 
					    "node_modules/v8-to-istanbul": {
 | 
				
			||||||
      "version": "9.2.0",
 | 
					      "version": "9.2.0",
 | 
				
			||||||
      "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.2.0.tgz",
 | 
					      "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.2.0.tgz",
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -32,13 +32,11 @@
 | 
				
			||||||
    "@actions/exec": "^1.1.1",
 | 
					    "@actions/exec": "^1.1.1",
 | 
				
			||||||
    "@actions/github": "^6.0.0",
 | 
					    "@actions/github": "^6.0.0",
 | 
				
			||||||
    "@actions/io": "^1.1.3",
 | 
					    "@actions/io": "^1.1.3",
 | 
				
			||||||
    "@actions/tool-cache": "^2.0.1",
 | 
					    "@actions/tool-cache": "^2.0.1"
 | 
				
			||||||
    "uuid": "^9.0.1"
 | 
					 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  "devDependencies": {
 | 
					  "devDependencies": {
 | 
				
			||||||
    "@types/jest": "^29.5.12",
 | 
					    "@types/jest": "^29.5.12",
 | 
				
			||||||
    "@types/node": "^24.1.0",
 | 
					    "@types/node": "^24.1.0",
 | 
				
			||||||
    "@types/uuid": "^9.0.8",
 | 
					 | 
				
			||||||
    "@typescript-eslint/eslint-plugin": "^7.9.0",
 | 
					    "@typescript-eslint/eslint-plugin": "^7.9.0",
 | 
				
			||||||
    "@typescript-eslint/parser": "^7.9.0",
 | 
					    "@typescript-eslint/parser": "^7.9.0",
 | 
				
			||||||
    "@vercel/ncc": "^0.38.1",
 | 
					    "@vercel/ncc": "^0.38.1",
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -8,7 +8,6 @@ import * as path from 'path'
 | 
				
			||||||
import * as regexpHelper from './regexp-helper'
 | 
					import * as regexpHelper from './regexp-helper'
 | 
				
			||||||
import * as stateHelper from './state-helper'
 | 
					import * as stateHelper from './state-helper'
 | 
				
			||||||
import * as urlHelper from './url-helper'
 | 
					import * as urlHelper from './url-helper'
 | 
				
			||||||
import {v4 as uuid} from 'uuid'
 | 
					 | 
				
			||||||
import {IGitCommandManager} from './git-command-manager'
 | 
					import {IGitCommandManager} from './git-command-manager'
 | 
				
			||||||
import {IGitSourceSettings} from './git-source-settings'
 | 
					import {IGitSourceSettings} from './git-source-settings'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -89,7 +88,7 @@ class GitAuthHelper {
 | 
				
			||||||
    // Create a temp home directory
 | 
					    // Create a temp home directory
 | 
				
			||||||
    const runnerTemp = process.env['RUNNER_TEMP'] || ''
 | 
					    const runnerTemp = process.env['RUNNER_TEMP'] || ''
 | 
				
			||||||
    assert.ok(runnerTemp, 'RUNNER_TEMP is not defined')
 | 
					    assert.ok(runnerTemp, 'RUNNER_TEMP is not defined')
 | 
				
			||||||
    const uniqueId = uuid()
 | 
					    const uniqueId = crypto.randomUUID()
 | 
				
			||||||
    this.temporaryHomePath = path.join(runnerTemp, uniqueId)
 | 
					    this.temporaryHomePath = path.join(runnerTemp, uniqueId)
 | 
				
			||||||
    await fs.promises.mkdir(this.temporaryHomePath, {recursive: true})
 | 
					    await fs.promises.mkdir(this.temporaryHomePath, {recursive: true})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -209,7 +208,7 @@ class GitAuthHelper {
 | 
				
			||||||
    // Write key
 | 
					    // Write key
 | 
				
			||||||
    const runnerTemp = process.env['RUNNER_TEMP'] || ''
 | 
					    const runnerTemp = process.env['RUNNER_TEMP'] || ''
 | 
				
			||||||
    assert.ok(runnerTemp, 'RUNNER_TEMP is not defined')
 | 
					    assert.ok(runnerTemp, 'RUNNER_TEMP is not defined')
 | 
				
			||||||
    const uniqueId = uuid()
 | 
					    const uniqueId = crypto.randomUUID()
 | 
				
			||||||
    this.sshKeyPath = path.join(runnerTemp, uniqueId)
 | 
					    this.sshKeyPath = path.join(runnerTemp, uniqueId)
 | 
				
			||||||
    stateHelper.setSshKeyPath(this.sshKeyPath)
 | 
					    stateHelper.setSshKeyPath(this.sshKeyPath)
 | 
				
			||||||
    await fs.promises.mkdir(runnerTemp, {recursive: true})
 | 
					    await fs.promises.mkdir(runnerTemp, {recursive: true})
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -6,7 +6,6 @@ import * as io from '@actions/io'
 | 
				
			||||||
import * as path from 'path'
 | 
					import * as path from 'path'
 | 
				
			||||||
import * as retryHelper from './retry-helper'
 | 
					import * as retryHelper from './retry-helper'
 | 
				
			||||||
import * as toolCache from '@actions/tool-cache'
 | 
					import * as toolCache from '@actions/tool-cache'
 | 
				
			||||||
import {v4 as uuid} from 'uuid'
 | 
					 | 
				
			||||||
import {getServerApiUrl} from './url-helper'
 | 
					import {getServerApiUrl} from './url-helper'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const IS_WINDOWS = process.platform === 'win32'
 | 
					const IS_WINDOWS = process.platform === 'win32'
 | 
				
			||||||
| 
						 | 
					@ -34,7 +33,7 @@ export async function downloadRepository(
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  // Write archive to disk
 | 
					  // Write archive to disk
 | 
				
			||||||
  core.info('Writing archive to disk')
 | 
					  core.info('Writing archive to disk')
 | 
				
			||||||
  const uniqueId = uuid()
 | 
					  const uniqueId = crypto.randomUUID()
 | 
				
			||||||
  const archivePath = IS_WINDOWS
 | 
					  const archivePath = IS_WINDOWS
 | 
				
			||||||
    ? path.join(repositoryPath, `${uniqueId}.zip`)
 | 
					    ? path.join(repositoryPath, `${uniqueId}.zip`)
 | 
				
			||||||
    : path.join(repositoryPath, `${uniqueId}.tar.gz`)
 | 
					    : path.join(repositoryPath, `${uniqueId}.tar.gz`)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue