From 319a7f4a02f0429c561c7ae8c864c508875e68fd Mon Sep 17 00:00:00 2001 From: Yaron Kaikov Date: Mon, 14 Oct 2024 22:29:47 +0300 Subject: [PATCH] [.github/workflow/rust.yml] Add docker credentials to avoid rate limit To avoid errors such ``` Error toomanyrequests: You have reached your pull rate limit. You may increase the limit by authenticating and upgrading: https://www.docker.com/increase-rate-limit ``` we should add login to our Scylladb docker hub Adding it --- .github/workflows/authenticate_test.yml | 4 ++++ .github/workflows/book.yml | 3 +++ .github/workflows/cassandra.yml | 3 +++ .github/workflows/rust.yml | 8 ++++++++ .github/workflows/tls.yml | 3 +++ 5 files changed, 21 insertions(+) diff --git a/.github/workflows/authenticate_test.yml b/.github/workflows/authenticate_test.yml index b6a8251661..9b1b77bb5b 100644 --- a/.github/workflows/authenticate_test.yml +++ b/.github/workflows/authenticate_test.yml @@ -25,9 +25,13 @@ jobs: ports: - 9042:9042 options: --health-cmd "cqlsh --username cassandra --password cassandra --debug" --health-interval 5s --health-retries 30 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} steps: - uses: actions/checkout@v3 - name: Update rust toolchain run: rustup update - name: Run tests run: RUST_LOG=trace cargo test --verbose authenticate_superuser -- custom_authentication --ignored + diff --git a/.github/workflows/book.yml b/.github/workflows/book.yml index 4d3caa5062..a37385215b 100644 --- a/.github/workflows/book.yml +++ b/.github/workflows/book.yml @@ -25,6 +25,9 @@ jobs: ports: - 9042:9042 options: --health-cmd "cqlsh --debug scylladb" --health-interval 5s --health-retries 10 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} steps: - uses: actions/checkout@v3 - name: Update rust toolchain diff --git a/.github/workflows/cassandra.yml b/.github/workflows/cassandra.yml index 4926ece5d6..ddac70463b 100644 --- a/.github/workflows/cassandra.yml +++ b/.github/workflows/cassandra.yml @@ -24,6 +24,9 @@ jobs: - name: Setup 3-node Cassandra cluster run: | docker compose -f test/cluster/cassandra/docker-compose.yml up -d --wait + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} # A separate step for building to separate measuring time of compilation and testing - name: Update rust toolchain run: rustup update diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index b16887fe26..6623e35555 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -22,10 +22,18 @@ jobs: timeout-minutes: 60 steps: - uses: actions/checkout@v3 + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Setup 3-node Scylla cluster run: | sudo sh -c "echo 2097152 >> /proc/sys/fs/aio-max-nr" docker compose -f test/cluster/docker-compose.yml up -d --wait + env: + DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} + DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }} - name: Update rust toolchain run: rustup update - name: Print rustc version diff --git a/.github/workflows/tls.yml b/.github/workflows/tls.yml index 65e0721b59..4960f86466 100644 --- a/.github/workflows/tls.yml +++ b/.github/workflows/tls.yml @@ -30,6 +30,9 @@ jobs: --health-retries 10 env: working-directory: ./scylla + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} steps: - uses: actions/checkout@v3 - name: Update rust toolchain