Skip to content

Commit

Permalink
Use github action core method to do logging
Browse files Browse the repository at this point in the history
  • Loading branch information
acrobat committed Aug 21, 2021
1 parent e7b177f commit d46b243
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 3 additions & 1 deletion src/helpers/git.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { exec } from '@actions/exec';
import * as core from '@actions/core';
import { getExecOutput } from './github';

async function ensureRemoteExists(name: string, target: string): Promise<void> {
Expand Down Expand Up @@ -29,7 +30,8 @@ async function publishSubSplit(binary: string, target: string, branch: string, n

async function commitHashHasTag(hash: string, clonePath: string) {
let output = await getExecOutput('git', ['tag', '--points-at', hash], { cwd: clonePath });
console.log(hash, 'points-at', output);

core.info(`${hash} points-at ${output}`);

return output !== '';
}
Expand Down
6 changes: 3 additions & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ async function downloadSplitsh(): Promise<void> {
let downloadPath = `${downloadDir}split-lite.tar.gz`;
let platform = process.platform === 'darwin' ? 'lite_darwin_amd64' : 'lite_linux_amd64';

console.log(`Downloading splitsh for "${platform}"`);
core.debug(`Downloading splitsh for "${platform}"`);

let url = `https://github.com/splitsh/lite/releases/download/v1.0.1/${platform}.tar.gz`;

Expand Down Expand Up @@ -62,7 +62,7 @@ async function downloadSplitsh(): Promise<void> {
let tag = event.ref;

if (event.ref_type !== 'tag') {
console.log('No tag was created, skipping...');
core.info('No tag was created, skipping...');

return;
}
Expand All @@ -85,7 +85,7 @@ async function downloadSplitsh(): Promise<void> {
let tag = event.ref;

if (event.ref_type !== 'tag') {
console.log('No tag was deleted, skipping...');
core.info('No tag was deleted, skipping...');

return;
}
Expand Down

0 comments on commit d46b243

Please sign in to comment.