diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a494828..5c0b08b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -11,16 +11,15 @@ jobs: 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 + - name: install buildx + id: buildx + uses: crazy-max/ghaction-docker-buildx@v1 - name: Build image run: make build - name: Publish image - run: make publish latest + run: make publish diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 3c21a57..0000000 --- a/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -.Dockerfile -*.yaml -qemu-*-static diff --git a/Dockerfile b/Dockerfile index 13cfea6..5876cc3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,11 +1,10 @@ FROM ruby:alpine ARG VERSION=v4.1.1 -LABEL maintainer="Jay MOULIN " -LABEL version="${VERSION}" +ARG TARGETPLATFORM +LABEL maintainer="Jay MOULIN " +LABEL version="${VERSION}-${TARGETPLATFORM}" - -COPY qemu-* /usr/bin/ RUN apk add make g++ --update --virtual .build-deps --no-cache && gem install t && apk del make --purge .build-deps CMD ["-"] diff --git a/Makefile b/Makefile index f2b23b1..fc041ec 100644 --- a/Makefile +++ b/Makefile @@ -1,29 +1,9 @@ VERSION ?= v4.1.1 CACHE ?= --no-cache=1 -FULLVERSION ?= v4.1.1 -archs ?= i386 amd64 arm64v8 arm32v6 - -.PHONY: all build publish latest publish-manifest -amd: build publish -qemu-arm-static: - cp /usr/bin/qemu-arm-static . -qemu-aarch64-static: - cp /usr/bin/qemu-aarch64-static . -build: qemu-aarch64-static qemu-arm-static - $(foreach arch,$(archs), \ - cat Dockerfile | sed "s/FROM ruby:alpine/FROM ${arch}\/ruby:alpine/g" > .Dockerfile; \ - docker build -t jaymoulin/twitter-cli:${VERSION}-$(arch) -t ghcr.io/jaymoulin/twitter-cli:${VERSION}-$(arch) -f .Dockerfile --build-arg VERSION=${VERSION} ${CACHE} .;\ - ) +.PHONY: all build publish +all: build publish +build: + docker buildx build --platform linux/arm/v7,linux/arm64/v8,linux/amd64,linux/arm/v6,linux/386 ${PUSH} --build-arg VERSION=${VERSION} --tag jaymoulin/twitter-cli --tag jaymoulin/twitter-cli:${VERSION} ${CACHE} . publish: - docker push jaymoulin/twitter-cli -a - docker push ghcr.io/jaymoulin/twitter-cli -a -publish-manifest: - cat 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-manifest + PUSH=--push CACHE= make build + diff --git a/README.md b/README.md index 500ef33..88ed886 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,12 @@ +> [!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.) + +> [!TIP] +> THIS REPOSITORY IS AUTO-UPDATED BY [GITHUB-RELEASE-NOTIFIER](https://github.com/femtopixel/github-release-notifier) (https://github.com/femtopixel/github-release-notifier) + ![logo](logo.png) Docker Image (Multiarch) - Twitter CLI Client @@ -10,12 +19,6 @@ Docker Image (Multiarch) - Twitter CLI Client [![Buy me a coffee](https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png "Buy me a coffee")](https://www.buymeacoffee.com/jaymoulin) [![Buy me a coffee](https://ko-fi.com/img/githubbutton_sm.svg "Buy me a coffee")](https://www.ko-fi.com/jaymoulin) -DISCLAIMER: As-of 2021, this product does not have a free support team anymore. If you want this product to be maintained, please support on Patreon. - -(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 REPOSITORY IS AUTO-UPDATED BY [GITHUB-RELEASE-NOTIFIER](https://github.com/femtopixel/github-release-notifier) (https://github.com/femtopixel/github-release-notifier) - This program allows you to use Twitter in CLI through Docker technology This work is based upon [Sferik's T (Twitter CLI client)](https://github.com/sferik/t). diff --git a/manifest.yml b/manifest.yml deleted file mode 100644 index 8d41a34..0000000 --- a/manifest.yml +++ /dev/null @@ -1,23 +0,0 @@ -image: jaymoulin/twitter-cli:$FULLVERSION -manifests: - - - image: jaymoulin/twitter-cli:$VERSION-arm64v8 - platform: - architecture: arm64 - os: linux - - - image: jaymoulin/twitter-cli:$VERSION-arm32v6 - platform: - architecture: arm - variant: v6 - os: linux - - - image: jaymoulin/twitter-cli:$VERSION-amd64 - platform: - architecture: amd64 - os: linux - - - image: jaymoulin/twitter-cli:$VERSION-i386 - platform: - architecture: 386 - os: linux