Skip to content

Commit

Permalink
try fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
fabiankachlock committed Feb 7, 2024
1 parent 50c71d6 commit 40b2ddc
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ jobs:
id: test-action
uses: ./
with:
milliseconds: 2000
version: 1.0.0-alpha

- name: Print Output
id: output
run: echo "${{ steps.test-action.outputs.time }}"
run: echo "${{ steps.test-action.outputs.version }}"
2 changes: 0 additions & 2 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ on:
pull_request:
branches:
- main
schedule:
- cron: '31 7 * * 3'

jobs:
analyze:
Expand Down
2 changes: 1 addition & 1 deletion __tests__/main.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ test('test runs', () => {
const action: any = yaml.load(fs.readFileSync(config, 'utf8'))

Check failure on line 31 in __tests__/main.test.ts

View workflow job for this annotation

GitHub Actions / Lint Codebase

Unexpected any. Specify a different type

Check failure on line 31 in __tests__/main.test.ts

View workflow job for this annotation

GitHub Actions / TypeScript Tests

Unexpected any. Specify a different type
process.env['INPUT_VERSION'] = action.inputs.version.default
const np = process.execPath
const ip = path.join(__dirname, '..', 'dist', 'main.js')
const ip = path.join(__dirname, '..', 'dist', 'index.js')
const options: cp.ExecFileSyncOptions = {
env: process.env
}
Expand Down
1 change: 1 addition & 0 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,19 @@ export async function run(): Promise<void> {

// Download the specific version of the tool, e.g. as a tarball/zipball
const download = await getDownloadUrl(version)
core.debug(`Downloading ${download}`)
const pathToTarball = await tc.downloadTool(download)

// Extract the tarball/zipball onto host runner
const pathToCLI = await tc.extractTar(pathToTarball)

// Expose the tool by adding it to the PATH
core.debug(`Adding ${pathToCLI} to PATH`)
core.addPath(pathToCLI)

// Expose installed tool version
const determinedVersion = await determineInstalledVersion()
core.debug(`Installed version: ${determinedVersion}`)
core.setOutput('version', determinedVersion)
} catch (error) {
if (error instanceof Error) core.setFailed(error.message)
Expand Down

0 comments on commit 40b2ddc

Please sign in to comment.