Skip to content

Commit e419a10

Browse files
committed
only run trivy scan on image bumps
1 parent 3fbc9e9 commit e419a10

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

.github/workflows/trivyscan.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ on:
44
push:
55
branches:
66
- ci/nightly-builds
7+
paths:
8+
- 'environments/.stackhpc/terraform/cluster_image.json'
79

810
jobs:
911
scan:

environments/.stackhpc/terraform/main.tf

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,14 @@ variable "os_version" {
2525
default = "RL9"
2626
}
2727

28+
locals {
29+
image_names = jsondecode(file("./cluster_image.json"))
30+
}
31+
2832
variable "cluster_image" {
2933
description = "single image for all cluster nodes, keyed by os_version - a convenience for CI"
3034
type = map(string)
31-
default = jsondecode(file("./cluster_image.json"))
35+
default = locals.image_names
3236
}
3337

3438
variable "cluster_net" {}

0 commit comments

Comments
 (0)