diff --git a/.dockerignore b/.dockerignore index 889a4dfc784..abc5b82f03c 100644 --- a/.dockerignore +++ b/.dockerignore @@ -3,6 +3,7 @@ Dockerfile Dockerfile.armhf .dockerignore +docker/ .coveragerc .eggs .github diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ab640789e24..dbcde8adf80 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -375,13 +375,6 @@ jobs: run: | echo "${DOCKER_PASSWORD}" | docker login --username ${DOCKER_USERNAME} --password-stdin - - name: Build and test and push docker image - env: - IMAGE_NAME: freqtradeorg/freqtrade - BRANCH_NAME: ${{ steps.extract_branch.outputs.branch }} - run: | - build_helpers/publish_docker.sh - # We need docker experimental to pull the ARM image. - name: Switch docker to experimental run: | @@ -400,6 +393,13 @@ jobs: - name: Available platforms run: echo ${{ steps.buildx.outputs.platforms }} + - name: Build and test and push docker image + env: + IMAGE_NAME: freqtradeorg/freqtrade + BRANCH_NAME: ${{ steps.extract_branch.outputs.branch }} + run: | + build_helpers/publish_docker.sh + - name: Build Raspberry docker image env: IMAGE_NAME: freqtradeorg/freqtrade diff --git a/build_helpers/publish_docker.sh b/build_helpers/publish_docker.sh index d987bcc6998..da9fc4e343c 100755 --- a/build_helpers/publish_docker.sh +++ b/build_helpers/publish_docker.sh @@ -53,6 +53,7 @@ docker images docker push ${IMAGE_NAME} docker push ${IMAGE_NAME}:$TAG_PLOT docker push ${IMAGE_NAME}:$TAG + if [ $? -ne 0 ]; then echo "failed pushing repo" return 1 diff --git a/build_helpers/publish_docker_pi.sh b/build_helpers/publish_docker_pi.sh index d3a941a1f2f..7c77c5ba10d 100755 --- a/build_helpers/publish_docker_pi.sh +++ b/build_helpers/publish_docker_pi.sh @@ -7,7 +7,7 @@ TAG_ORIG=$(echo "${BRANCH_NAME}" | sed -e "s/\//_/g") TAG="${TAG_ORIG}_pi" PI_PLATFORM="linux/arm/v7" -echo "Running for ${TAG}" +echo "Running for ${TAG_ORIG}" CACHE_TAG=freqtradeorg/freqtrade_cache:${TAG}_cache # Add commit and commit_message to docker container @@ -17,7 +17,7 @@ if [ "${GITHUB_EVENT_NAME}" = "schedule" ]; then echo "event ${GITHUB_EVENT_NAME}: full rebuild - skipping cache" docker buildx build \ --cache-to=type=registry,ref=${CACHE_TAG} \ - -f Dockerfile.armhf \ + -f docker/Dockerfile.armhf \ --platform ${PI_PLATFORM} \ -t ${IMAGE_NAME}:${TAG} --push . else @@ -27,15 +27,15 @@ else docker buildx build \ --cache-from=type=registry,ref=${CACHE_TAG} \ --cache-to=type=registry,ref=${CACHE_TAG} \ - -f Dockerfile.armhf \ + -f docker/Dockerfile.armhf \ --platform ${PI_PLATFORM} \ -t ${IMAGE_NAME}:${TAG} --push . fi docker images -docker manifest create freqtradeorg/freqtrade:${TAG}_multi ${IMAGE_NAME}:${TAG_ORIG} ${IMAGE_NAME}:${TAG} -docker manifest push freqtradeorg/freqtrade:${TAG}_multi +docker manifest create freqtradeorg/freqtrade:${TAG_ORIG} ${IMAGE_NAME}:${TAG_ORIG} ${IMAGE_NAME}:${TAG} +docker manifest push freqtradeorg/freqtrade:${TAG_ORIG} docker images diff --git a/Dockerfile.armhf b/docker/Dockerfile.armhf similarity index 100% rename from Dockerfile.armhf rename to docker/Dockerfile.armhf