3
0
Fork 0
mirror of https://github.com/tj-actions/changed-files synced 2024-12-19 15:04:19 +00:00
changed-files/src/env.ts

17 lines
423 B
TypeScript
Raw Normal View History

import * as core from '@actions/core'
export type Env = {
GITHUB_REF_NAME: string
GITHUB_REF: string
GITHUB_WORKSPACE: string
}
export const getEnv = async (): Promise<Env> => {
2024-01-18 05:40:27 +00:00
core.debug(`Env: ${JSON.stringify(process.env, null, 2)}`)
return {
GITHUB_REF_NAME: process.env.GITHUB_REF_NAME || '',
GITHUB_REF: process.env.GITHUB_REF || '',
GITHUB_WORKSPACE: process.env.GITHUB_WORKSPACE || ''
}
}