mirror of
				https://github.com/actions/checkout.git
				synced 2025-11-04 13:29:15 +08:00 
			
		
		
		
	Add Ref and Commit outputs (#1180)
Signed-off-by: Luca Comellini <luca.com@gmail.com>
This commit is contained in:
		@@ -261,7 +261,8 @@ export async function getSource(settings: IGitSourceSettings): Promise<void> {
 | 
			
		||||
    const commitInfo = await git.log1()
 | 
			
		||||
 | 
			
		||||
    // Log commit sha
 | 
			
		||||
    await git.log1("--format='%H'")
 | 
			
		||||
    const commitSHA = await git.log1('--format=%H')
 | 
			
		||||
    core.setOutput('commit', commitSHA.trim())
 | 
			
		||||
 | 
			
		||||
    // Check for incorrect pull request merge commit
 | 
			
		||||
    await refHelper.checkCommitInfo(
 | 
			
		||||
 
 | 
			
		||||
@@ -19,6 +19,7 @@ async function run(): Promise<void> {
 | 
			
		||||
 | 
			
		||||
      // Get sources
 | 
			
		||||
      await gitSourceProvider.getSource(sourceSettings)
 | 
			
		||||
      core.setOutput('ref', sourceSettings.ref)
 | 
			
		||||
    } finally {
 | 
			
		||||
      // Unregister problem matcher
 | 
			
		||||
      coreCommand.issueCommand('remove-matcher', {owner: 'checkout-git'}, '')
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user