test if event is pull request

This commit is contained in:
Al Majumdar 2022-03-30 14:02:17 +05:30
parent fa0b9c97a5
commit 0a17ee9bd8

View file

@ -13,6 +13,10 @@ variable "ERPNEXT_VERSION" {
default = "develop" default = "develop"
} }
variable "GITHUB_EVENT_NAME" {
default = "pull_request"
}
# Bench image # Bench image
target "bench" { target "bench" {
@ -58,10 +62,7 @@ target "default-args" {
# If `ERPNEXT_VERSION` variable contains "v12" use Python 3.7. Else  3.9. # If `ERPNEXT_VERSION` variable contains "v12" use Python 3.7. Else  3.9.
PYTHON_VERSION = can(regex("v12", "${ERPNEXT_VERSION}")) ? "3.7" : "3.9" PYTHON_VERSION = can(regex("v12", "${ERPNEXT_VERSION}")) ? "3.7" : "3.9"
} }
platforms = [ platforms = notequal("pull_request", ${GITHUB_EVENT_NAME}}, ["linux/amd64","linux/arm64"], ["linux/amd64"])
"linux/amd64",
"linux/arm64"
]
} }
target "frappe-worker" { target "frappe-worker" {