mirror of
https://github.com/Ride-The-Lightning/RTL.git
synced 2024-11-19 01:40:29 +01:00
62 lines
1.8 KiB
YAML
62 lines
1.8 KiB
YAML
version: 2.1
|
|
|
|
executors:
|
|
docker-executor:
|
|
docker:
|
|
- image: circleci/python:3.8
|
|
|
|
jobs:
|
|
setup-docker-buildx:
|
|
executor: docker-executor
|
|
steps:
|
|
- setup_remote_docker:
|
|
version: 20.10.7
|
|
experimental: true
|
|
- run:
|
|
name: Set up QEMU
|
|
command: |
|
|
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
|
|
|
|
publish_docker:
|
|
executor: docker-executor
|
|
steps:
|
|
- setup_remote_docker:
|
|
version: 20.10.7
|
|
experimental: true
|
|
- checkout
|
|
- run:
|
|
name: Set up QEMU
|
|
command: |
|
|
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
|
|
- run:
|
|
name: Build and push Docker images
|
|
command: |
|
|
LATEST_TAG="${CIRCLE_TAG:1}"
|
|
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 .
|
|
|
|
workflows:
|
|
version: 2
|
|
publish:
|
|
jobs:
|
|
- setup-docker-buildx
|
|
- publish_docker:
|
|
requires:
|
|
- setup-docker-buildx
|
|
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])*))?)$/
|