This commit is contained in:
Corey Butler
2019-09-02 17:50:18 -05:00
parent 4c27ef90b4
commit db869bc067
24 changed files with 1 additions and 1541 deletions

View File

@ -1,18 +1,11 @@
// import * as core from '@actions/core';
const github = require('@actions/github')
const core = require('@actions/core')
const exec = require('@actions/exec')
const io = require('@actions/io')
const fs = require('fs')
const path = require('path')
async function run() {
try {
const gitpath = await io.which('git', true)
await exec.exec(`"${gitpath}"`, ['fetch'])
await exec.exec(`"${gitpath}"`, ['checkout', process.env.GITHUB_SHA])
// await exec.exec(`git fetch && git checkout ${process.env.GITHUB_SHA}`)
// const myToken = core.getInput('myToken');
const git = new github.GitHub(process.env.INPUT_GITHUB_TOKEN)
core.warning(` Available environment variables:\n -> ${Object.keys(process.env).map(i => i + ' :: ' + process.env[i]).join('\n -> ')}`)