automating multi-platform builds
This commit is contained in:
parent
944a86d1d6
commit
1b07a0fa48
1 changed files with 20 additions and 8 deletions
28
.github/workflows/docker-autobuild.yml
vendored
28
.github/workflows/docker-autobuild.yml
vendored
|
@ -14,22 +14,34 @@ jobs:
|
||||||
|
|
||||||
-
|
-
|
||||||
name: Setup Docker Buildx
|
name: Setup Docker Buildx
|
||||||
uses: crazy-max/ghaction-docker-buildx@v1
|
run: |
|
||||||
|
# Build docker buildx from source
|
||||||
|
export DOCKER_BUILDKIT=1
|
||||||
|
docker build --platform=local -o . git://github.com/docker/buildx
|
||||||
|
mkdir -p ~/.docker/cli-plugins
|
||||||
|
mv buildx ~/.docker/cli-plugins/docker-buildx
|
||||||
|
|
||||||
|
# Docker version information
|
||||||
|
echo "DOCKER VERSION:"
|
||||||
|
docker info
|
||||||
|
echo "BUILDX VERSION:"
|
||||||
|
docker buildx version
|
||||||
|
|
||||||
|
# Install qemu-user-static container
|
||||||
|
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
|
||||||
|
docker buildx create --name builder --driver docker-container --use
|
||||||
|
docker buildx inspect --bootstrap
|
||||||
|
|
||||||
-
|
-
|
||||||
name: Available Platforms
|
name: Build and Push
|
||||||
env:
|
|
||||||
VERSIONS: ${{ steps.buildx.outputs.platforms }}
|
|
||||||
run: echo ${VERSIONS}
|
|
||||||
|
|
||||||
-
|
|
||||||
name: Build and Upload
|
|
||||||
env:
|
env:
|
||||||
DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }}
|
DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
# Variables
|
# Variables
|
||||||
TAG=$(date +%y.%m)
|
TAG=$(date +%y.%m)
|
||||||
NAME=silentdigit/letsencrypt
|
NAME=silentdigit/letsencrypt
|
||||||
|
|
||||||
|
#Login
|
||||||
docker login -u silentdigit -p ${DOCKER_TOKEN}
|
docker login -u silentdigit -p ${DOCKER_TOKEN}
|
||||||
|
|
||||||
# Build image as TAG version
|
# Build image as TAG version
|
||||||
|
|
Loading…
Reference in a new issue