2024-06-25 03:04:20 +02:00
|
|
|
version: 2.1
|
|
|
|
|
|
|
|
executors:
|
|
|
|
docker-executor:
|
|
|
|
docker:
|
|
|
|
- image: circleci/python:3.8
|
|
|
|
|
2019-02-13 04:35:27 +01:00
|
|
|
jobs:
|
2024-06-25 03:04:20 +02:00
|
|
|
setup-docker-buildx:
|
|
|
|
executor: docker-executor
|
2019-02-20 04:45:55 +01:00
|
|
|
steps:
|
2024-06-25 03:04:20 +02:00
|
|
|
- setup_remote_docker:
|
|
|
|
version: 20.10.7
|
|
|
|
experimental: true
|
2019-02-20 04:45:55 +01:00
|
|
|
- run:
|
2024-06-25 03:04:20 +02:00
|
|
|
name: Set up QEMU
|
2019-02-20 04:45:55 +01:00
|
|
|
command: |
|
2024-06-25 03:04:20 +02:00
|
|
|
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
|
2019-02-13 04:35:27 +01:00
|
|
|
- run:
|
2024-06-25 03:04:20 +02:00
|
|
|
name: Set up Buildx
|
2019-02-13 04:35:27 +01:00
|
|
|
command: |
|
2024-06-25 03:04:20 +02:00
|
|
|
docker buildx create --use
|
|
|
|
docker buildx inspect --bootstrap
|
2019-02-20 04:45:55 +01:00
|
|
|
|
2024-06-25 03:04:20 +02:00
|
|
|
publish_docker:
|
|
|
|
executor: docker-executor
|
2019-08-08 03:53:54 +02:00
|
|
|
steps:
|
2024-06-25 03:04:20 +02:00
|
|
|
- setup_remote_docker:
|
|
|
|
version: 20.10.7
|
|
|
|
experimental: true
|
|
|
|
- checkout
|
2019-08-08 03:53:54 +02:00
|
|
|
- run:
|
2024-06-25 03:04:20 +02:00
|
|
|
name: Set up QEMU
|
2019-08-08 03:53:54 +02:00
|
|
|
command: |
|
2024-06-25 03:04:20 +02:00
|
|
|
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
|
|
|
|
- run:
|
|
|
|
name: Set up Buildx
|
|
|
|
command: |
|
|
|
|
docker buildx create --use
|
|
|
|
docker buildx inspect --bootstrap
|
2022-08-10 08:27:55 +02:00
|
|
|
- run:
|
2024-06-25 03:04:20 +02:00
|
|
|
name: Build and push Docker images
|
2022-08-10 08:27:55 +02:00
|
|
|
command: |
|
|
|
|
LATEST_TAG="${CIRCLE_TAG:1}"
|
2024-06-25 03:04:20 +02:00
|
|
|
DOCKERHUB_DESTINATION="$DOCKERHUB_REPO:$LATEST_TAG"
|
|
|
|
docker login --username=$DOCKERHUB_USER --password=$DOCKERHUB_PASS
|
|
|
|
docker buildx build --platform linux/amd64,linux/arm/v7,linux/arm64/v8 --pull -t "$DOCKERHUB_DESTINATION" -f dockerfiles/Dockerfile --push .
|
2022-08-10 08:27:55 +02:00
|
|
|
|
2019-02-13 04:35:27 +01:00
|
|
|
workflows:
|
|
|
|
version: 2
|
|
|
|
publish:
|
|
|
|
jobs:
|
2024-06-25 03:04:20 +02:00
|
|
|
- setup-docker-buildx
|
|
|
|
- publish_docker:
|
2022-08-10 08:27:55 +02:00
|
|
|
requires:
|
2024-06-25 03:04:20 +02:00
|
|
|
- setup-docker-buildx
|
2022-08-10 08:27:55 +02:00
|
|
|
filters:
|
|
|
|
branches:
|
|
|
|
ignore: /.*/
|
|
|
|
tags:
|
|
|
|
only: /v(?:(?<major>(?:0|[1-9](?:(?:0|[1-9])+)*))[.](?<minor>(?:0|[1-9](?:(?:0|[1-9])+)*))[.](?<patch>(?:0|[1-9](?:(?:0|[1-9])+)*))(?:-(?:([A-Za-z1-9])*))?)$/
|