Skip to content

Commit 9ad3dcd

Browse files
committed
Attempting to outline some more guardrails for myself, untested at this time
1 parent cd079c0 commit 9ad3dcd

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

scripts/build.pl

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,25 @@
1111
die 'Usage build.pl <version>';
1212
}
1313

14+
if (not -f 'Dockerfile') {
15+
die 'No Dockerfile found';
16+
}
17+
18+
if (not -f 'gh') {
19+
die 'No gh found';
20+
}
21+
22+
if (not -f 'action.yml') {
23+
die 'No action.yml found';
24+
}
25+
26+
open my $fh, '<', 'action.yml';
27+
my $action_yml = do { local $/; <$fh> };
28+
if ($action_yml !~ m/docker:\/\/jonasbn\/github-action-spellcheck:$version/) {
29+
die "Version in action.yml does not match: $version";
30+
}
31+
close $fh;
32+
1433
say "Building Docker images for version: $version";
1534

1635
my @targets = qw(v0 latest);

0 commit comments

Comments
 (0)