-
Notifications
You must be signed in to change notification settings - Fork 164
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
github/workflows : fail test_suite_pr if PR images are not pushed yet
Signed-off-by: Shahriyar Jalayeri <[email protected]>
- Loading branch information
Showing
1 changed file
with
21 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,7 +22,28 @@ concurrency: | |
cancel-in-progress: true | ||
|
||
jobs: | ||
check_pr_publish: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check Image Availability | ||
run: | | ||
DOCKER_HUB_PATH="evebuild/danger" | ||
# currently we only test amd64 (kvms and xen) with Eden | ||
IMAGE_AMD64_XEN="pr${{ github.event.pull_request.number }}-xen" | ||
IMAGE_AMD64_KVM="pr${{ github.event.pull_request.number }}-kvm" | ||
amd64_xen_res=$(curl -s "https://hub.docker.com/v2/repositories/${DOCKER_HUB_PATH}/tags/${IMAGE_AMD64_XEN}") | ||
amd64_kvm_res=$(curl -s "https://hub.docker.com/v2/repositories/${DOCKER_HUB_PATH}/tags/${IMAGE_AMD64_KVM}") | ||
if [[ "$(echo "$amd64_xen_res" | jq -r '.name')" == "${IMAGE_AMD64_XEN}" && "$(echo "$amd64_kvm_res" | jq -r '.name')" == "${IMAGE_AMD64_KVM}" ]]; then | ||
echo "Docker image ${DOCKER_HUB_PATH}:${IMAGE_AMD64_XEN} and ${DOCKER_HUB_PATH}:${IMAGE_AMD64_KVM} are available on Docker Hub." | ||
exit 0 | ||
else | ||
echo "Docker image ${DOCKER_HUB_PATH}:${IMAGE_AMD64_XEN} and ${DOCKER_HUB_PATH}:${IMAGE_AMD64_KVM} are not available on Docker Hub." | ||
exit 1 | ||
fi | ||
test_suite_pr: | ||
needs: check_pr_publish | ||
if: github.event.review.state == 'approved' | ||
uses: lf-edge/eden/.github/workflows/[email protected] | ||
with: | ||
|