[ci] Stricter check on pre_command skip (#165519)

When buildkite-agent is uploading a pipeline we can skip setting up our
node environment. This stricter check avoids matching on similarly named
steps, e.g. our storybooks upload.
This commit is contained in:
Jon 2023-09-01 14:42:14 -05:00 committed by GitHub
parent 1dce3b94e3
commit e52dd715ca
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2,8 +2,7 @@
set -euo pipefail
echo "BUILDKITE_COMMAND: $BUILDKITE_COMMAND"
if [[ "$BUILDKITE_COMMAND" =~ .*"upload".* ]]; then
if [[ "$BUILDKITE_COMMAND" =~ ^"buildkite-agent pipeline upload" ]]; then
echo "Skipped pre-command when running the Upload pipeline"
exit 0
fi