Skip to content

Commit

Permalink
show version
Browse files Browse the repository at this point in the history
  • Loading branch information
maximtop committed Apr 27, 2024
1 parent a8e9bb7 commit ce50e97
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
2 changes: 2 additions & 0 deletions bamboo-specs/example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ Test:
# Combine stderr and stdout for consistent log output.
exec 2>&1
github-actions-runner -V
GITHUB_TOKEN=${bamboo.githubActionsRunnerPassword} github-actions-runner run-action \
--repo AdguardTeam/GithubActionsRunner \
--branch "${bamboo_planRepository_branchName}" \
Expand Down
2 changes: 2 additions & 0 deletions src/cli/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ program.command('run-action')
workflowRunCompletionTimeout,
secret: secrets,
syncSecrets,
version,
} = options;
const token = process.env.GITHUB_TOKEN;
if (!token) {
Expand Down Expand Up @@ -142,6 +143,7 @@ program.command('run-action')
workflowRunCompletionTimeoutMs: workflowRunCompletionTimeout,
secrets,
syncSecrets,
version,
});
} catch (e) {
logger.error(e);
Expand Down
8 changes: 8 additions & 0 deletions src/lib/GitHubActionsRunner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,11 @@ interface RunActionOptions {
* If true, it will sync secrets with the repository and remove any secrets that are not in the provided list.
*/
syncSecrets?: boolean;

/**
* A github-actions-runner version.
*/
version: string;
}

/**
Expand Down Expand Up @@ -147,6 +152,7 @@ export class GitHubActionsRunner {
* @param root0.workflowRunCompletionTimeoutMs Wait for workflow run completion timeout.
* @param root0.secrets Secrets to pass to the action.
* @param root0.syncSecrets Sync secrets with the repository.
* @param root0.version github actions runner version.

Check failure on line 155 in src/lib/GitHubActionsRunner.ts

View workflow job for this annotation

GitHub Actions / test

Sentences should start with an uppercase character
* @returns A promise that resolves when the action is completed.
* @throws Error if something went wrong.
*/
Expand All @@ -161,7 +167,9 @@ export class GitHubActionsRunner {
workflowRunCompletionTimeoutMs,
secrets,
syncSecrets,
version,
}: RunActionOptions): Promise<void> {
logger.info(`github-actions-runner version: ${version}`);
logger.info(`Starting action for repository "${this.owner}/${this.repo}"`);
logger.info(`Workflow: "${workflow}"`);
logger.info(`Revision: "${rev}"`);
Expand Down

0 comments on commit ce50e97

Please sign in to comment.