From 677b1be4865a19574d6ad38051734ddc56250e5f Mon Sep 17 00:00:00 2001 From: Jay MOULIN Date: Thu, 2 May 2024 17:12:19 +0200 Subject: [PATCH] moved from manifest to buildx --- .github/workflows/main.yml | 10 +++++----- .gitignore | 3 --- Dockerfile | 12 ++++-------- Makefile | 21 +++++---------------- README.md | 15 +++++++++------ manifest.yml | 23 ----------------------- 6 files changed, 23 insertions(+), 61 deletions(-) delete mode 100644 .gitignore delete mode 100644 manifest.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7f02f65..5c0b08b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -11,15 +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 + - 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 9e3ac02..0000000 --- a/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -qemu-*-static -*.yaml -.Dockerfile diff --git a/Dockerfile b/Dockerfile index c600b25..e19c3ed 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,13 +1,9 @@ -FROM python:alpine as builder - -COPY qemu-*-static /usr/bin/ - -FROM builder +FROM python:alpine ARG VERSION=3.1.5 -ARG VERSION_LABEL=3.1.4 -LABEL maintainer="Jay MOULIN " -LABEL version=${VERSION_LABEL} +ARG TARGETPLATFORM +LABEL maintainer="Jay MOULIN " +LABEL version=${VERSION}-${TARGETPLATFORM} #Use alpine to save disk space RUN apk add --no-cache git bash &&\ git clone https://github.com/s0md3v/XSStrike.git &&\ diff --git a/Makefile b/Makefile index 663e157..0a330dd 100644 --- a/Makefile +++ b/Makefile @@ -1,21 +1,10 @@ VERSION ?= 3.1.5 CACHE ?= --no-cache=1 -FULLVERSION ?= 3.1.5 -archs ?= arm32v7 amd64 i386 arm64v8 arm32v6 -.PHONY: docker build publish latest -docker: build publish latest +.PHONY: all build publish +all: build publish build: - cp -r /usr/bin/qemu-*-static . - $(foreach arch,$(archs), \ - cat Dockerfile | sed "s/FROM python:alpine/FROM ${arch}\/python:alpine/g" > .Dockerfile; \ - docker build -t femtopixel/xsstrike:${VERSION}-$(arch) --build-arg VERSION=${VERSION} --build-arg VERSION_LABEL=${VERSION}-$(arch) -f .Dockerfile ${CACHE} .;\ - ) + docker buildx build --platform linux/arm/v7,linux/arm64/v8,linux/amd64,linux/arm/v6,linux/386 ${PUSH} --build-arg VERSION=${VERSION} --tag femtopixel/xsstrike --tag femtopixel/xsstrike:${VERSION} ${CACHE} . publish: - docker push femtopixel/xsstrike -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 -latest: build - FULLVERSION=latest VERSION=${VERSION} make publish + PUSH=--push CACHE= make build + diff --git a/README.md b/README.md index 4907c9e..2eb91a4 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 "logo") XSStrike - Docker Image @@ -10,12 +19,6 @@ XSStrike - Docker Image [![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. - -(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 image allows you to have [XSStrike](https://github.com/s0md3v/XSStrike) installed easily thanks to Docker. Usage diff --git a/manifest.yml b/manifest.yml deleted file mode 100644 index 1c267fb..0000000 --- a/manifest.yml +++ /dev/null @@ -1,23 +0,0 @@ -image: femtopixel/xsstrike:$FULLVERSION -manifests: - - - image: femtopixel/xsstrike:$VERSION-arm32v6 - platform: - architecture: arm - variant: v6 - os: linux - - - image: femtopixel/xsstrike:$VERSION-arm64v8 - platform: - architecture: arm64 - os: linux - - - image: femtopixel/xsstrike:$VERSION-amd64 - platform: - architecture: amd64 - os: linux - - - image: femtopixel/xsstrike:$VERSION-i386 - platform: - architecture: 386 - os: linux