1
0
Fork 0

Merge pull request #12 from WarpBuilds/fix-merge-group-restores

fix: merge group restores
pull/1935/head
Prajjwal 2024-11-21 11:18:52 +05:30 committed by GitHub
commit 1d2f2a40cf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 12 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "github-actions.warp-cache", "name": "github-actions.warp-cache",
"version": "1.4.0", "version": "1.4.1",
"preview": true, "preview": true,
"description": "Github action to use WarpBuild's in-house cache offering", "description": "Github action to use WarpBuild's in-house cache offering",
"keywords": [ "keywords": [

View File

@ -184,19 +184,14 @@ export async function getCacheEntry(
} }
} }
break break
case 'push': default:
case 'workflow_dispatch': const payload = github?.context?.payload
{
const pushPayload = github.context.payload as PushEvent
// Default branch is not in the complete format // Default branch is not in the complete format
// Ref: https://docs.github.com/en/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#push // Ref: https://docs.github.com/en/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#push
restoreBranches.add( if (payload?.repository?.default_branch) {
`refs/heads/${pushPayload?.repository?.default_branch}` restoreBranches.add(`refs/heads/${payload?.repository?.default_branch}`)
)
} }
break break
default:
break
} }
const getCacheRequest: CommonsGetCacheRequest = { const getCacheRequest: CommonsGetCacheRequest = {