Skip to content

Prepare QCW Docker (from revision) #14

Prepare QCW Docker (from revision)

Prepare QCW Docker (from revision) #14

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