antongolub/action-setup-bun

View on GitHub
src/main/ts/post.ts

Summary

Maintainability
A
0 mins
Test Coverage
B
82%
import * as core from '@actions/core'
import { saveCache } from './cache.js'
import { keys } from './constants.js'
import { getInput } from './util.js'

async function post() {
  if (!getInput('cache')) return

  try {
    await saveCache(core.getState(keys.CACHE_PATH))
  } catch (e: any) {
    core.setOutput('error', e.message)
    core.setFailed(e.message)
  }
}

await post()