Skip to content
Permalink
Browse files
autobuild: add working-directory input
  • Loading branch information
Chuan-kai Lin committed Apr 8, 2022
1 parent 2d80fe8 commit b0c570ef831ff590914bc634a504523f320c265b
Showing 5 changed files with 22 additions and 3 deletions.
@@ -2,7 +2,7 @@

## [UNRELEASED]

No user facing changes.
- Add `working-directory` input to the `autobuild` action. [#1024](https://github.com/github/codeql-action/pull/1024)

## 2.1.8 - 08 Apr 2022

@@ -6,6 +6,12 @@ inputs:
default: ${{ github.token }}
matrix:
default: ${{ toJson(matrix) }}
working-directory:
description: >-
Run the autobuilder using this path (relative to $GITHUB_WORKSPACE) as
working directory. If this input is not set, the autobuilder runs with
$GITHUB_WORKSPACE as its working directory.
required: false
runs:
using: 'node16'
main: '../lib/autobuild-action.js'
main: '../lib/autobuild-action.js'

Some generated files are not rendered by default. Learn more.

Some generated files are not rendered by default. Learn more.

@@ -3,6 +3,7 @@ import * as core from "@actions/core";
import {
createStatusReportBase,
getActionsStatus,
getOptionalInput,
getTemporaryDirectory,
sendStatusReport,
StatusReportBase,
@@ -71,6 +72,13 @@ async function run() {
}
language = determineAutobuildLanguage(config, logger);
if (language !== undefined) {
const workingDirectory = getOptionalInput("working-directory");
if (workingDirectory) {
logger.info(
`Changing autobuilder working directory to ${workingDirectory}`
);
process.chdir(workingDirectory);
}
await runAutobuild(language, config, logger);
}
} catch (error) {

0 comments on commit b0c570e

Please sign in to comment.