# Copyright 2024 RustFS Team # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. name: Set up Docker Compose description: Install the verified Compose CLI used by native Linux x86_64 Connect acceptance runs: using: composite steps: - name: Install verified Docker Compose CLI plugin shell: bash run: | set -euo pipefail [[ $(uname -s) == Linux && $(uname -m) == x86_64 ]] plugin_dir="${DOCKER_CONFIG:-$HOME/.docker}/cli-plugins" mkdir -p "$plugin_dir" compose_download=$(mktemp "${RUNNER_TEMP:?}/connect-compose.XXXXXX") compose_staged=$(mktemp "$plugin_dir/.docker-compose.XXXXXX") trap 'rm -f "$compose_download" "$compose_staged"' EXIT curl --fail --location --retry 3 \ https://github.com/docker/compose/releases/download/v2.40.3/docker-compose-linux-x86_64 \ --output "$compose_download" printf '%s %s\n' \ dba9d98e1ba5bfe11d88c99b9bd32fc4a0624a30fafe68eea34d61a3e42fd372 \ "$compose_download" | sha256sum --check --strict install -m 0755 "$compose_download" "$compose_staged" mv -f "$compose_staged" "$plugin_dir/docker-compose" [[ $(docker compose version --short) == 2.40.3 ]]