mirror of
https://github.com/actions/checkout.git
synced 2025-12-13 22:09:23 +00:00
Add ref output to action
This value is the SHA1 commit of the repository ref that was actually checked out.
This commit is contained in:
3
dist/index.js
vendored
3
dist/index.js
vendored
@@ -32007,7 +32007,8 @@ function getSource(settings) {
|
||||
// Get commit information
|
||||
const commitInfo = yield git.log1();
|
||||
// Log commit sha
|
||||
yield git.log1("--format='%H'");
|
||||
const commit = yield git.log1("--format='%H'");
|
||||
core.setOutput('ref', commit.replaceAll("'", '').trim());
|
||||
// Check for incorrect pull request merge commit
|
||||
yield refHelper.checkCommitInfo(settings.authToken, commitInfo, settings.repositoryOwner, settings.repositoryName, settings.ref, settings.commit, settings.githubServerUrl);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user