Skip to content

Commit

Permalink
Add script to check for run-test-stage label
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorific committed Nov 19, 2024
1 parent 5c3e936 commit 56fc5c3
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions bin/run-test-stage.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash

set -eu -o pipefail

json_data="$(docker buildx bake --print 2>/dev/null)"
first_build_target=$(echo "$json_data" | jq -r '.target | to_entries[0].value')
if echo "$first_build_target" | jq -e '.labels."dev.polymathrobotics.test.container-build-publish-action.run-test-stage"' > /dev/null; then
run_test_stage=$(echo "$first_build_target" | jq -r '.labels."dev.polymathrobotics.test.container-build-publish-action.run-test-stage"')
echo "$run_test_stage"
else
echo "true"
fi

0 comments on commit 56fc5c3

Please sign in to comment.