Skip to content

Commit bc2c77b

Browse files
authored
govulncheck-action: fix path to Containerfile (#160)
I thought that it would be relative to the specific `context`, but it appears [it is not](https://github.com/codeready-toolchain/toolchain-cicd/actions/runs/20071545487/job/57574739655) --------- Signed-off-by: Xavier Coulon <xcoulon@redhat.com>
1 parent a589e72 commit bc2c77b

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

.github/workflows/govulncheck-action-publish.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,11 @@ on:
55
- master
66
paths:
77
- 'govulncheck-action/**'
8+
- '.github/workflows/govulncheck-action-*.yml'
89

910
jobs:
1011
build-image:
12+
name: Build and push image
1113
runs-on: ubuntu-24.04
1214
steps:
1315
- name: Checkout code
@@ -24,7 +26,7 @@ jobs:
2426
image: codeready-toolchain/govulncheck-action
2527
tags: latest ${{ env.COMMIT_SHORT_SHA }}
2628
context: govulncheck-action
27-
containerfiles: Containerfile
29+
containerfiles: govulncheck-action/Containerfile
2830

2931
- name: Log into quay.io
3032
uses: redhat-actions/podman-login@v1

govulncheck-action/internal/govulncheck/scan.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,15 @@ func DefaultScan(stderr io.Writer) ScanFunc {
3535
logger.Info("scanning for vulnerabilities", "path", path)
3636
info, err := os.Stat(path)
3737
if err != nil {
38-
return nil, fmt.Errorf("invalid scan path: %w", err)
38+
return nil, fmt.Errorf("invalid scan path '%s': %w", path, err)
3939
}
4040
if !info.IsDir() {
41-
return nil, fmt.Errorf("path is not a directory: %w", err)
41+
return nil, fmt.Errorf("path '%s' is not a directory: %w", path, err)
4242
}
4343
if logger.Enabled(ctx, slog.LevelDebug) {
4444
files, err := os.ReadDir(path)
4545
if err != nil {
46-
return nil, fmt.Errorf("failed to read directory: %w", err)
46+
return nil, fmt.Errorf("failed to read directory '%s': %w", path, err)
4747
}
4848
for _, file := range files {
4949
logger.Debug(file.Name())

0 commit comments

Comments
 (0)