diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 1238ab6..3769545 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -9,17 +9,16 @@ jobs:
build-docker-and-package:
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v1
+ - uses: actions/checkout@v2
- name: Installing dependencies
run: |
sudo apt update && sudo apt install make -y
- git clone https://github.com/estesp/manifest-tool && cd manifest-tool && git checkout v0.9.0 && sudo make && sudo make install && cd .. && rm -Rf manifest-tool
- docker run --rm --privileged multiarch/qemu-user-static:register
- sudo apt install -y qemu qemu-user-static qemu-user binfmt-support
echo "${{ secrets.DOCKER_HUB_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_HUB_LOGIN }}" --password-stdin
- echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u "${{ github.actor }}" --password-stdin
sudo apt update && sudo apt install make python3-pip python3-setuptools -y
pip3 install twine
+ - name: install buildx
+ id: buildx
+ uses: crazy-max/ghaction-docker-buildx@v1
- name: Build package
run: make install
- name: Publish package
@@ -27,4 +26,4 @@ jobs:
- name: Build image
run: make build-docker
- name: Publish image
- run: make publish-docker latest
+ run: make publish-docker
diff --git a/.gitignore b/.gitignore
index 7d09d64..b3a5c17 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,6 +2,3 @@
/dist
/youtube_music_uploader.egg-info
/youtube_music_uploader/__pycache__
-.Dockerfile
-*.yaml
-qemu-*-static
diff --git a/Makefile b/Makefile
index 3c8dcc2..7525984 100644
--- a/Makefile
+++ b/Makefile
@@ -1,31 +1,15 @@
-.PHONY: all test publish install clean check build-docker publish-docker latest
+.PHONY: all test publish install clean check build-docker publish-docker
VERSION ?= 1.2.0
CACHE ?= --no-cache=1
-FULLVERSION ?= 1.1.0
-archs ?= amd64 i386 arm64v8 arm32v6
-all: build-docker publish-docker latest
-qemu-arm-static:
- cp /usr/bin/qemu-arm-static .
-qemu-aarch64-static:
- cp /usr/bin/qemu-aarch64-static .
-build-docker: qemu-arm-static qemu-aarch64-static
- $(foreach arch,$(archs), \
- cat docker/Dockerfile | sed "s/FROM python:alpine/FROM ${arch}\/python:alpine/g" > .Dockerfile; \
- docker build -t ghcr.io/jaymoulin/youtube-music-uploader:${VERSION}-$(arch) -t jaymoulin/youtube-music-uploader:${VERSION}-$(arch) -f .Dockerfile --build-arg VERSION=${VERSION} ${CACHE} .;\
- )
+
+all: build-docker publish-docker
+build-docker:
+ docker buildx build --platform linux/arm/v7,linux/arm64/v8,linux/amd64 ${PUSH} --build-arg VERSION=${VERSION} --tag jaymoulin/youtube-music-uploader --tag jaymoulin/youtube-music-uploader:${VERSION} ${CACHE} -f ./docker/Dockerfile .
publish-docker:
- docker push jaymoulin/youtube-music-uploader -a
- docker push ghcr.io/jaymoulin/youtube-music-uploader -a
- cat docker/manifest.yml | sed "s/\$$VERSION/${VERSION}/g" > manifest.yaml
- cat manifest.yaml | sed "s/\$$FULLVERSION/${FULLVERSION}/g" > manifest2.yaml
- mv manifest2.yaml manifest.yaml
- manifest-tool push from-spec manifest.yaml
- cat manifest.yaml | sed "s/jaymoulin/ghcr.io\/jaymoulin/g" > manifest2.yaml
- mv manifest2.yaml manifest.yaml
- manifest-tool push from-spec manifest.yaml
-latest:
- FULLVERSION=latest VERSION=${VERSION} make publish-docker
+ PUSH=--push CACHE= make build-docker
+
+
test: install
twine upload -r testpypi dist/*
publish: install
diff --git a/docker/Dockerfile b/docker/Dockerfile
index 0e499fe..96d20da 100644
--- a/docker/Dockerfile
+++ b/docker/Dockerfile
@@ -1,13 +1,10 @@
-FROM python:alpine as builder
-
-COPY qemu-*-static /usr/bin/
-
-FROM builder
+FROM python:alpine
ARG VERSION=1.3.1
+ARG TARGETPLATFORM
-LABEL maintainer="Jay MOULIN "
-LABEL version=${VERSION}
+LABEL maintainer="Jay MOULIN "
+LABEL version=${VERSION}-${TARGETPLATFORM}
ENV REMOVE=0
ENV ONESHOT=0
diff --git a/docker/README.md b/docker/README.md
index a2e4000..7212d83 100644
--- a/docker/README.md
+++ b/docker/README.md
@@ -1,3 +1,9 @@
+> [!CAUTION]
+> As-of 2021, this product does not have a free support team anymore. If you want this product to be maintained, please support my work.
+
+> [!NOTE]
+> (This product is available under a free and permissive license, but needs financial support to sustain its continued improvements. In addition to maintenance and stability there are many desirable features yet to be added.)
+

Youtube Music Uploader - Docker Image
@@ -9,8 +15,6 @@ Youtube Music Uploader - Docker Image
[](https://www.buymeacoffee.com/jaymoulin)
[](https://www.ko-fi.com/jaymoulin)
-(This product is available under a free and permissive license, but needs financial support to sustain its continued improvements. In addition to maintenance and stability there are many desirable features yet to be added.)
-
This image allows you to watch a folder and upload all new MP3 added to your Youtube Music Library.
Installation
diff --git a/docker/manifest.yml b/docker/manifest.yml
deleted file mode 100644
index 8699e36..0000000
--- a/docker/manifest.yml
+++ /dev/null
@@ -1,23 +0,0 @@
-image: jaymoulin/youtube-music-uploader:$FULLVERSION
-manifests:
- -
- image: jaymoulin/youtube-music-uploader:$VERSION-arm32v6
- platform:
- architecture: arm
- variant: v6
- os: linux
- -
- image: jaymoulin/youtube-music-uploader:$VERSION-arm64v8
- platform:
- architecture: arm64
- os: linux
- -
- image: jaymoulin/youtube-music-uploader:$VERSION-amd64
- platform:
- architecture: amd64
- os: linux
- -
- image: jaymoulin/youtube-music-uploader:$VERSION-i386
- platform:
- architecture: 386
- os: linux