Skip to content

Commit

Permalink
Attempting to outline some more guardrails for myself, untested at th…
Browse files Browse the repository at this point in the history
…is time
  • Loading branch information
jonasbn committed Jul 19, 2024
1 parent cd079c0 commit 9ad3dcd
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions scripts/build.pl
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,25 @@
die 'Usage build.pl <version>';
}

if (not -f 'Dockerfile') {
die 'No Dockerfile found';
}

if (not -f 'gh') {
die 'No gh found';
}

if (not -f 'action.yml') {
die 'No action.yml found';
}

open my $fh, '<', 'action.yml';
my $action_yml = do { local $/; <$fh> };
if ($action_yml !~ m/docker:\/\/jonasbn\/github-action-spellcheck:$version/) {
die "Version in action.yml does not match: $version";
}
close $fh;

say "Building Docker images for version: $version";

my @targets = qw(v0 latest);
Expand Down

0 comments on commit 9ad3dcd

Please sign in to comment.