Skip to content

Commit 6e58f58

Browse files
committed
fix: mkdir artifacts path
https://github.com/siderolabs/talos/actions/runs/18161485672/job/51693088020 Make is not set to create artifacts dir. Create it manually if it does not exists. Signed-off-by: Mateusz Urbanek <[email protected]>
1 parent 3165a2b commit 6e58f58

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

hack/cloud-image-uploader/factory.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,11 @@ func (f *FactoryDownloader) getArtifact(ctx context.Context, name string) (io.Re
7575
func (f *FactoryDownloader) saveArtifact(name string, r io.Reader) error {
7676
artifact := filepath.Join(f.Options.ArtifactsPath, name)
7777

78+
err := os.MkdirAll(f.Options.ArtifactsPath, 0o755)
79+
if err != nil {
80+
return fmt.Errorf("failed to create artifacts directory %q: %w", f.Options.ArtifactsPath, err)
81+
}
82+
7883
of, err := os.OpenFile(artifact, os.O_CREATE|os.O_TRUNC|os.O_WRONLY, 0o644)
7984
if err != nil {
8085
return fmt.Errorf("failed to create file %q: %w", artifact, err)

0 commit comments

Comments
 (0)