How to use the @actions/core.endGroup function in @actions/core

To help you get started, we’ve selected a few @actions/core examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github newrelic / newrelic-ruby-agent / .github / actions / build-ruby / index.js View on Github external
// executes the following all in parallel  
  const promise1 = exec.exec('sudo', ['apt-get', 'remove', 'mysql-client'])
  const promise2 = exec.exec('wget', [pkgOption, `${mirrorUrl}/libmysqlclient18_5.5.62-0%2Bdeb8u1_amd64.deb`])
  const promise3 = exec.exec('wget', [pkgOption, `${mirrorUrl}/libmysqlclient-dev_5.5.62-0%2Bdeb8u1_amd64.deb`])
  const promise4 = exec.exec('wget', [pkgOption, `${ubuntuUrl}/g/glibc/multiarch-support_2.27-3ubuntu1.2_amd64.deb`])

  // wait for the parallel processes to finish
  await Promise.all([promise1, promise2, promise3, promise4])

  // executes serially
  await exec.exec('sudo', ['dpkg', '-i', `${pkgDir}/multiarch-support_2.27-3ubuntu1.2_amd64.deb`])
  await exec.exec('sudo', ['dpkg', '-i', `${pkgDir}/libmysqlclient18_5.5.62-0+deb8u1_amd64.deb`])
  await exec.exec('sudo', ['dpkg', '-i', `${pkgDir}/libmysqlclient-dev_5.5.62-0+deb8u1_amd64.deb`])

  core.endGroup()
}
github newrelic / newrelic-ruby-agent / .github / actions / build-ruby / index.js View on Github external
const openSslPath = rubyOpenSslPath(rubyVersion);

  core.exportVariable('OPENSSL_DIR', openSslPath)

  prependEnv('LDFLAGS', `-L${openSslPath}/lib`)
  prependEnv('CPPFLAGS', `-I${openSslPath}/include`)
  prependEnv('PKG_CONFIG_PATH', `${openSslPath}/lib/pkgconfig`, ':')

  openSslOption = `--with-openssl-dir=${openSslPath}`
  core.exportVariable('CONFIGURE_OPTS', openSslOption)
  prependEnv('RUBY_CONFIGURE_OPTS', openSslOption)

  // required for some versions of nokogiri
  gemInstall('pkg-config', '~> 1.1.7')

  core.endGroup()
}
github newrelic / newrelic-ruby-agent / .github / actions / build-ruby / index.js View on Github external
async function installSystemDependencies() {
  core.startGroup(`Installing system dependencies`)

  const dependencyList = 'libyaml-dev libgdbm-dev libreadline-dev libncurses5-dev zlib1g-dev libffi-dev'

  console.log(`installing system dependencies ${dependencyList}`)

  await exec.exec('sudo apt-get update')
  await exec.exec(`sudo apt-get install -y --no-install-recommends ${dependencyList}`)

  core.endGroup()
}
github actions-rs / grcov / src / grcov.ts View on Github external
public async call(config: configuration.Config, archive: string): Promise {
	    const postfix = Math.random().toString(36).substring(2, 15)
        const reportPath = config.user.outputFile ? path.resolve(config.user.outputFile) : path.join(os.tmpdir(), `grcov-report-${postfix}`);

        const args = this.buildArgs(config, archive, reportPath);

        try {
            core.startGroup('Execute grcov');
            await exec.exec(this.path, args);
        } catch (error) {
            throw error;
        } finally {
            core.endGroup();
        }

        core.info(`Generated coverage report at ${reportPath}`);
        return reportPath;
    }
github clupprich / ruby-build-action / src / index.js View on Github external
async function _installRubyBuild() {
  core.startGroup('Installing ruby-build')

  await _installDependencies()

  const rubyBuildDir = `${process.env.HOME}/var/ruby-build`
  await exec.exec(`git clone https://github.com/rbenv/ruby-build.git ${rubyBuildDir}`)
  await exec.exec(`sudo ${rubyBuildDir}/install.sh`, { env: { 'PREFIX': '/usr/local' } })

  core.endGroup()
}
github clupprich / ruby-build-action / src / index.js View on Github external
async function _installRuby(rubyVersion, cacheAvailable) {
  core.startGroup(`Installing ${rubyVersion}`)

  if (!cacheAvailable) {
    await exec.exec(`ruby-build ${rubyVersion} ${process.env.HOME}/local/rubies/${rubyVersion}`)
  } else {
    core.info(`Skipping installation of ${rubyVersion}, already available in cache.`)
  }

  core.addPath(`${process.env.HOME}/local/rubies/${rubyVersion}/bin`)
  const rubyPath = await io.which('ruby', true)
  await exec.exec(`${rubyPath} --version`)
  core.setOutput('ruby-path', rubyPath);

  core.endGroup()
}
github newrelic / newrelic-ruby-agent / .github / actions / build-ruby / index.js View on Github external
async function showVersions() {
  core.startGroup("Show Versions")

  await exec.exec('ruby', ['--version'])
  await exec.exec('ruby', ['-ropenssl', '-e', "puts OpenSSL::OPENSSL_LIBRARY_VERSION"])
  await exec.exec('gem', ['--version'])
  await exec.exec('bundle', ['--version'])
  await exec.exec('openssl', ['version'])

  core.endGroup()
}
github newrelic / newrelic-ruby-agent / .github / actions / build-ruby / index.js View on Github external
async function restoreRubyFromCache(rubyVersion) {
  core.startGroup(`Restore Ruby from Cache`)
 
  const key = rubyCacheKey(rubyVersion)
  await cache.restoreCache(rubyCachePaths(rubyVersion), key, [key])
  
  core.endGroup()
}
github newrelic / newrelic-ruby-agent / .github / actions / build-ruby / index.js View on Github external
async function buildRuby(rubyVersion) {
  core.startGroup(`Build Ruby ${rubyVersion}`)
  await exec.exec(`ruby-build --verbose ${rubyVersion} ${rubyPath(rubyVersion)}`) 
  core.endGroup()
}
github numworks / setup-msys2 / index.js View on Github external
'setlocal',
      'IF NOT DEFINED MSYS2_PATH_TYPE set MSYS2_PATH_TYPE=' + core.getInput('path-type'),
      `%~dp0\\msys64\\usr\\bin\\bash.exe -ilc "cd $OLDPWD && %*"`
    ].join('\r\n'));

    core.addPath(dest);

    core.exportVariable('MSYSTEM', core.getInput('msystem'));

    core.startGroup('Starting MSYS2 for the first time...');
      await exec.exec(`msys2do`, (core.getInput('update') == 'true') ?
        ['pacman', '-Syu', '--noconfirm']
        :
        ['uname', '-a']
      );
    core.endGroup();
  }
  catch (error) {
    core.setFailed(error.message);
  }
}