mirror actions/checkout @ 11d5960a326750d5838078e36cf38b85af677262
Check dist / check-dist (push) Failing after 1s
CodeQL / Analyze (javascript) (push) Failing after 1s
Licensed / Check licenses (push) Failing after 0s
Build and Test / build (push) Failing after 1s
Build and Test / test (ubuntu-latest) (push) Failing after 1s
Build and Test / test-bypass-proxy (push) Failing after 2s
Build and Test / test-proxy (push) Failing after 22m37s
Build and Test / test (macos-latest) (push) Canceled after 0s
Build and Test / test (windows-latest) (push) Canceled after 0s
Build and Test / test-output (push) Canceled after 0s
Build and Test / test-git-container (push) Canceled after 1h13m23s

This commit is contained in:
George Berkshire
2026-08-16 19:45:24 +08:00
commit 524e936cd9
104 changed files with 54867 additions and 0 deletions
+47
View File
@@ -0,0 +1,47 @@
import * as core from '@actions/core'
import * as coreCommand from '@actions/core/lib/command'
import * as gitSourceProvider from './git-source-provider'
import * as inputHelper from './input-helper'
import * as path from 'path'
import * as stateHelper from './state-helper'
async function run(): Promise<void> {
try {
const sourceSettings = await inputHelper.getInputs()
try {
// Register problem matcher
coreCommand.issueCommand(
'add-matcher',
{},
path.join(__dirname, 'problem-matcher.json')
)
// Get sources
await gitSourceProvider.getSource(sourceSettings)
core.setOutput('ref', sourceSettings.ref)
} finally {
// Unregister problem matcher
coreCommand.issueCommand('remove-matcher', {owner: 'checkout-git'}, '')
}
} catch (error) {
core.setFailed(`${(error as any)?.message ?? error}`)
}
}
async function cleanup(): Promise<void> {
try {
await gitSourceProvider.cleanup(stateHelper.RepositoryPath)
} catch (error) {
core.warning(`${(error as any)?.message ?? error}`)
}
}
// Main
if (!stateHelper.IsPost) {
run()
}
// Post
else {
cleanup()
}