37 lines
1.1 KiB
YAML
37 lines
1.1 KiB
YAML
name: Setup Docker
|
|
|
|
description: |
|
|
Install Docker on the runner environment
|
|
This action uses Docker's official convenience installation script at https://get.docker.com/
|
|
|
|
By default, Docker Buildx is also configured to provide support for modern Docker build workflows, including multi-platform image builds, advanced caching, and BuildKit features.
|
|
Existing Docker installations are detected automatically and will not be reinstalled.
|
|
|
|
inputs:
|
|
setup-buildx:
|
|
description: Setup Docker Buildx
|
|
required: false
|
|
default: "true"
|
|
|
|
|
|
runs:
|
|
using: composite
|
|
|
|
steps:
|
|
- name: Install Docker
|
|
shell: bash
|
|
run: |
|
|
echo "Checking docker installation"
|
|
if command -v docker &> /dev/null; then
|
|
echo "Docker installation found"
|
|
else
|
|
echo "Docker installation not found. Docker will be installed"
|
|
curl -fsSL https://get.docker.com | sh
|
|
echo "Docker installed:"
|
|
docker --version
|
|
fi
|
|
|
|
- name: Set up Docker Buildx
|
|
if: inputs.setup-buildx == 'true'
|
|
uses: docker/setup-buildx-action@v3
|