diff --git a/.drone.yml b/.drone.yml index 9f2bbac..99d3c2e 100644 --- a/.drone.yml +++ b/.drone.yml @@ -62,49 +62,15 @@ steps: when: event: tag - - name: push image - arm - image: plugins/docker + - name: push images + image: thegeeklab/drone-docker-buildx settings: repo: iamthefij/resticscheduler auto_tag: true - auto_tag_suffix: linux-arm - username: - from_secret: docker_username - password: - from_secret: docker_password - build_args: - - BIN=./dist/resticscheduler-linux-arm - - - name: push image - arm64 - image: plugins/docker - settings: - repo: iamthefij/resticscheduler - auto_tag: true - auto_tag_suffix: linux-arm64 - username: - from_secret: docker_username - password: - from_secret: docker_password - build_args: - - BIN=./dist/resticscheduler-linux-arm64 - - - name: push image - amd64 - image: plugins/docker - settings: - repo: iamthefij/resticscheduler - auto_tag: true - auto_tag_suffix: linux-amd64 - username: - from_secret: docker_username - password: - from_secret: docker_password - - - name: publish manifest - image: plugins/manifest - settings: - spec: docker-manifest.tmpl - auto_tag: true - ignore_missing: true + platforms: + - linux/amd64 + - linux/arm64 + - linux/arm username: from_secret: docker_username password: diff --git a/Dockerfile b/Dockerfile index 93b9382..f537a5c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,7 @@ FROM scratch -ARG BIN=./dist/resticscheduler-linux-amd64 -COPY ${BIN} /bin/resticscheduler +ARG TARGETOS +ARG TARGETARCH +COPY ./dist/resticscheduler-$TARGETOS-$TARGETARCH /bin/resticscheduler ENTRYPOINT [ "/resticscheduler" ] diff --git a/Makefile b/Makefile index 86487d1..41be0b9 100644 --- a/Makefile +++ b/Makefile @@ -57,5 +57,5 @@ $(TARGETS): $(GOFILES) $(TARGET_ALIAS): $(MAKE) $(addprefix dist/,$@) -$(addprefix docker-,$(TARGET_ALIAS)): - docker build --build-arg BIN=dist/$(@:docker-%=%) . +# $(addprefix docker-,$(TARGET_ALIAS)): +# docker build --build-arg BIN=dist/$(@:docker-%=%) .