Skip to content

Commit

Permalink
Moved from manifest to buildx
Browse files Browse the repository at this point in the history
  • Loading branch information
jaymoulin committed May 2, 2024
1 parent d81a4c0 commit 4a52868
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 67 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,14 @@ 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
Expand Down
3 changes: 0 additions & 3 deletions .gitignore

This file was deleted.

7 changes: 3 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
FROM ruby:alpine

ARG VERSION=v4.1.1
LABEL maintainer="Jay MOULIN <jaymoulin@gmail.com>"
LABEL version="${VERSION}"
ARG TARGETPLATFORM
LABEL maintainer="Jay MOULIN <https://jaymoulin.me>"
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 ["-"]
Expand Down
32 changes: 6 additions & 26 deletions Makefile
Original file line number Diff line number Diff line change
@@ -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

15 changes: 9 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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).
Expand Down
23 changes: 0 additions & 23 deletions manifest.yml

This file was deleted.

0 comments on commit 4a52868

Please sign in to comment.