mirror of
https://github.com/ButlerLogic/action-autotag.git
synced 2025-09-08 22:24:03 +07:00
WIP
This commit is contained in:
@ -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 -> ')}`)
|
||||
|
||||
|
Reference in New Issue
Block a user