Prepare QCW Docker (from revision) #14
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
name: Prepare QCW Docker (from revision) | |
on: | |
workflow_dispatch: | |
workflow_call: | |
outputs: | |
cli_version: | |
description: "Docker CLI version" | |
value: ${{ jobs.build.outputs.cli_version }} | |
compose_version: | |
description: "Docker Compose version" | |
value: ${{ jobs.build.outputs.compose_version }} | |
env: | |
CLI_GITURL: https://github.com/docker/cli.git | |
CLI_SHA: b9d17eaebb55b7652ce37ae5c7c52fcb34194956 # v27.4.1 | |
CLI_VERSION: 27.4.1 | |
COMPOSE_GITURL: https://github.com/docker/compose.git | |
COMPOSE_SHA: c01c9c29f4212b9dc2dd7a6b480d402fe759efee # v2.32.1 | |
COMPOSE_VERSION: 2.32.1 | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
outputs: | |
cli_version: ${{ steps.make_versions.outputs.cli }} | |
compose_version: ${{ steps.make_versions.outputs.compose }} | |
steps: | |
- name: ποΈ Install Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: "π Configure checkout" | |
run: git config --global core.autocrlf input | |
- name: "π Checkout" | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 1 | |
- name: "π Fetch sources CLI" | |
run: | | |
mkdir docker-cli-release | |
cd docker-cli-release | |
git init | |
git remote add origin $CLI_GITURL | |
git fetch --depth 1 origin $CLI_SHA | |
git checkout FETCH_HEAD | |
- name: "π Fetch sources Compose" | |
run: | | |
mkdir docker-compose-release | |
cd docker-compose-release | |
git init | |
git remote add origin $COMPOSE_GITURL | |
git fetch --depth 1 origin $COMPOSE_SHA | |
git checkout FETCH_HEAD | |
- name: "π οΈ Build Docker CLI" | |
working-directory: docker-cli-release | |
run: | | |
docker buildx bake --set binary.platform=windows/amd64 | |
- name: "π οΈ Build Docker Compose" | |
working-directory: docker-compose-release | |
run: | | |
docker buildx bake --set binary.platform=windows/amd64 | |
- name: "π¦ Pack Docker" | |
run: | | |
mkdir -p qcw | |
cp docker-cli-release/build/docker-windows-amd64.exe qcw/docker.exe | |
cp docker-compose-release/bin/build/docker-compose.exe qcw/docker-compose.exe | |
cd qcw | |
find . -type f \( ! -iname "*.checksums" \) -exec sha256sum -b {} \; > sha.checksums | |
find . -type f \( ! -iname "*.checksums" \) -exec sha512sum -b {} \; >> sha.checksums | |
cat sha.checksums | |
- id: make_versions | |
name: "π Export versions" | |
run: | | |
echo "cli=$CLI_VERSION" >> "$GITHUB_OUTPUT" | |
echo "compose=$COMPOSE_VERSION" >> "$GITHUB_OUTPUT" | |
- name: "π Upload artifact" | |
uses: actions/upload-artifact@v4 | |
with: | |
name: qcw-docker | |
path: qcw |