Skip to content
This repository has been archived by the owner on May 2, 2024. It is now read-only.

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 e102463 commit e667040
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 86 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.

12 changes: 5 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
FROM debian:stable-slim as builder
FROM debian:stable-slim

COPY qemu-arm-static /usr/bin/
COPY qemu-aarch64-static /usr/bin/

FROM builder

LABEL maintainer="Jay MOULIN <jaymoulin@gmail.com> <https://twitter.com/MoulinJay>"
ARG VERSION
ARG TARGETPLATFORM
LABEL maintainer="Jay MOULIN <https://jaymoulin.me>"
LABEL version="${VERSION}-${TARGETPLATFORM}"

RUN apt-get update && apt-get install --force-yes -y twidge && apt-get clean

Expand Down
30 changes: 6 additions & 24 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,28 +1,10 @@
VERSION ?= debian/1.1.1
CACHE ?= --no-cache=1
FULLVERSION ?= debian/1.1.1
archs ?= amd64 arm32v5 arm32v7 arm64v8 i386

.PHONY: all build publish latest
all: build publish latest
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 debian:stable-slim/FROM ${arch}\/debian:stable-slim/g" > .Dockerfile; \
docker build -t jaymoulin/twidge:${VERSION}-$(arch) -t ghcr.io/jaymoulin/twidge:${VERSION}-$(arch) -f .Dockerfile ${CACHE} .;\
)
.PHONY: all build publish
all: build publish
build:
docker buildx build --platform linux/arm/v7,linux/arm64/v8,linux/amd64,linux/386,linux/arm/v6,linux/arm/v5 ${PUSH} --build-arg VERSION=${VERSION} --tag jaymoulin/twidge --tag jaymoulin/twidge:${VERSION} ${CACHE} .
publish:
docker push jaymoulin/twidge -a
docker push ghcr.io/jaymoulin/twidge -a
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
PUSH=--push CACHE= make build

27 changes: 9 additions & 18 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)

Twidge (Twitter CLI) - Docker Image (Multiarch)
Expand All @@ -10,17 +19,9 @@ Twidge (Twitter CLI) - Docker Image (Multiarch)
[![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)

Installation
------------

Please note that this package is also hosted on Github Container Registry, just add `ghcr.io/` before the image name (`docker pull ghcr.io/jaymoulin/twidge` instead of `jaymoulin/twidge`)

```
docker run --rm -ti -v /path/to/your/.twidgerc:/root/.twidgerc jaymoulin/twidge setup
```
Expand All @@ -43,13 +44,3 @@ docker run --rm -ti -v /path/to/your/.twidgerc:/root/.twidgerc jaymoulin/twidge

Learn more on [Twidge documentation](https://github.com/jgoerzen/twidge/wiki)

Appendixes
---

### Install Docker

If you don't have Docker installed yet, you can do it easily in one line using this command

```
curl -sSL "https://gist.githubusercontent.com/jaymoulin/e749a189511cd965f45919f2f99e45f3/raw/0e650b38fde684c4ac534b254099d6d5543375f1/ARM%2520(Raspberry%2520PI)%2520Docker%2520Install" | sudo sh && sudo usermod -aG docker $USER
```
29 changes: 0 additions & 29 deletions manifest.yml

This file was deleted.

0 comments on commit e667040

Please sign in to comment.