3
0
Fork 0
mirror of https://github.com/tj-actions/changed-files synced 2025-01-30 09:35:15 +00:00
changed-files/src/env.ts
Tonye Jack ec0b6d0e4c
chore: switch to use the github context (#1386)
Co-authored-by: GitHub Action <action@github.com>
2023-07-18 03:44:59 -06:00

16 lines
431 B
TypeScript

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> => {
core.debug(`Process 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 || ''
}
}