Emit deprecation warning for 'gradle-build-action'

This commit is contained in:
daz
2024-04-09 14:09:02 -06:00
parent 7e9e469530
commit aeb3156e6f
6 changed files with 64 additions and 25 deletions

View File

@@ -1,5 +1,5 @@
import * as core from '@actions/core'
import * as github from '@actions/github'
import {getActionId} from './configuration'
const DEPRECATION_UPGRADE_PAGE = 'https://github.com/gradle/actions/blob/main/docs/deprecation-upgrade-guide.md'
const recordedDeprecations: Deprecation[] = []
@@ -29,7 +29,7 @@ export function getDeprecations(): Deprecation[] {
export function emitDeprecationWarnings(): void {
if (recordedDeprecations.length > 0) {
core.warning(
`This job uses deprecated functionality from the '${github.context.action}' action. Consult the Job Summary for more details.`
`This job uses deprecated functionality from the '${getActionId()}' action. Consult the Job Summary for more details.`
)
for (const deprecation of recordedDeprecations) {
core.info(`DEPRECATION: ${deprecation.message}. See ${deprecation.getDocumentationLink()}`)