mirror of https://github.com/actions/toolkit
Merge pull request #12 from WarpBuilds/fix-merge-group-restores
fix: merge group restorespull/1935/head
commit
1d2f2a40cf
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "github-actions.warp-cache",
|
||||
"version": "1.4.0",
|
||||
"version": "1.4.1",
|
||||
"preview": true,
|
||||
"description": "Github action to use WarpBuild's in-house cache offering",
|
||||
"keywords": [
|
||||
|
|
|
@ -184,18 +184,13 @@ export async function getCacheEntry(
|
|||
}
|
||||
}
|
||||
break
|
||||
case 'push':
|
||||
case 'workflow_dispatch':
|
||||
{
|
||||
const pushPayload = github.context.payload as PushEvent
|
||||
// Default branch is not in the complete format
|
||||
// Ref: https://docs.github.com/en/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#push
|
||||
restoreBranches.add(
|
||||
`refs/heads/${pushPayload?.repository?.default_branch}`
|
||||
)
|
||||
}
|
||||
break
|
||||
default:
|
||||
const payload = github?.context?.payload
|
||||
// Default branch is not in the complete format
|
||||
// Ref: https://docs.github.com/en/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#push
|
||||
if (payload?.repository?.default_branch) {
|
||||
restoreBranches.add(`refs/heads/${payload?.repository?.default_branch}`)
|
||||
}
|
||||
break
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue