From b5e98997430c8076ac253a53b1d34f433abe7b26 Mon Sep 17 00:00:00 2001 From: thesayyn Date: Tue, 2 Jul 2024 17:18:13 +0300 Subject: [PATCH] retry fetch --- .github/workflows/ci.yaml | 34 ++++++++++++++++-------------- .github/workflows/image-check.yaml | 6 ++++++ 2 files changed, 24 insertions(+), 16 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 64ae974b3..b6fdc6dd4 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -3,9 +3,9 @@ name: CI on: workflow_dispatch: # Allow manual runs. pull_request: - branches: [ 'main' ] + branches: ["main"] push: - branches: [ 'main' ] + branches: ["main"] permissions: contents: read @@ -19,12 +19,12 @@ jobs: - name: Mount bazel caches uses: actions/cache@v4 with: - path: | - ~/.cache/bazel-repo - key: bazel-cache-deps-ci1-${{ github.sha }} - restore-keys: | - bazel-cache-deps-ci1-${{ github.sha }} - bazel-cache-deps-ci1- + path: | + ~/.cache/bazel-repo + key: bazel-cache-deps-ci1-${{ github.sha }} + restore-keys: | + bazel-cache-deps-ci1-${{ github.sha }} + bazel-cache-deps-ci1- - name: Free space run: | sudo apt-get remove -y '^dotnet-.*' @@ -57,12 +57,12 @@ jobs: - name: Mount bazel caches uses: actions/cache@v4 with: - path: | - ~/.cache/bazel-repo - key: bazel-cache-deps-ci2-${{ github.sha }} - restore-keys: | - bazel-cache-deps-ci2-${{ github.sha }} - bazel-cache-deps-ci2- + path: | + ~/.cache/bazel-repo + key: bazel-cache-deps-ci2-${{ github.sha }} + restore-keys: | + bazel-cache-deps-ci2-${{ github.sha }} + bazel-cache-deps-ci2- - name: Free space run: | sudo apt-get remove -y '^dotnet-.*' @@ -72,10 +72,12 @@ jobs: sudo apt-get autoremove -y sudo apt-get clean rm -rf /usr/share/dotnet/ + - name: Fetch run: | - for i in $(seq 5); do - bazel --bazelrc=$GITHUB_WORKSPACE/.github/workflows/ci.bazelrc fetch $(bazel query 'attr(tags, "amd64", ...)') && break || sleep 20; + for i in $(seq 10); do + bazel --bazelrc=$GITHUB_WORKSPACE/.github/workflows/ci.bazelrc cquery 'kind(merge_providers, deps(kind(oci_image, ...)))' --output=label --config=release && break || sleep 20; done + - name: Image Tests run: bazel --bazelrc=$GITHUB_WORKSPACE/.github/workflows/ci.bazelrc test $(bazel query 'attr(tags, "amd64", ...)') diff --git a/.github/workflows/image-check.yaml b/.github/workflows/image-check.yaml index e249f619c..966ce0a46 100644 --- a/.github/workflows/image-check.yaml +++ b/.github/workflows/image-check.yaml @@ -27,6 +27,12 @@ jobs: bazel-cache-deps-ci2-${{ github.sha }} bazel-cache-deps-ci2- + - name: Fetch + run: | + for i in $(seq 10); do + bazel --bazelrc=$GITHUB_WORKSPACE/.github/workflows/ci.bazelrc cquery 'kind(merge_providers, deps(kind(oci_image, ...)))' --output=label --config=release && break || sleep 20; + done + - name: Build all images run: bazel build //:sign_and_push