mirror of
https://github.com/actions/github-script.git
synced 2026-04-08 07:00:05 +00:00
Added helper
This commit is contained in:
parent
0fdfdff59e
commit
b1c1024769
2 changed files with 29 additions and 1 deletions
17
src/se.ts
17
src/se.ts
|
|
@ -1,9 +1,24 @@
|
|||
import {context} from '@actions/github'
|
||||
import * as child from 'child_process'
|
||||
import * as fs from 'fs'
|
||||
|
||||
export class Helper {
|
||||
public currentBuild: typeof context
|
||||
|
||||
public constructor(currentBuild: typeof context) {
|
||||
this.currentBuild = currentBuild
|
||||
}
|
||||
}
|
||||
|
||||
export let helper: Helper
|
||||
|
||||
export function setHelper(helperInstance: Helper) {
|
||||
helper = helperInstance
|
||||
}
|
||||
|
||||
export function createMetaJson(root: string): string[] {
|
||||
const execSync = child.execSync
|
||||
|
||||
console.log('Run number: ' + helper.currentBuild.runNumber)
|
||||
const xmllint = execSync('sudo apt install libxml2-utils', {
|
||||
shell: '/bin/bash'
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue