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 0756eab commit 677b1be
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 61 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
3 changes: 0 additions & 3 deletions .gitignore

This file was deleted.

12 changes: 4 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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 <jaymoulin@gmail.com> <https://twitter.com/MoulinJay>"
LABEL version=${VERSION_LABEL}
ARG TARGETPLATFORM
LABEL maintainer="Jay MOULIN <jaymoulin@gmail.com>"
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 &&\
Expand Down
21 changes: 5 additions & 16 deletions Makefile
Original file line number Diff line number Diff line change
@@ -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

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 "logo")

XSStrike - Docker Image
Expand All @@ -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
Expand Down
23 changes: 0 additions & 23 deletions manifest.yml

This file was deleted.

0 comments on commit 677b1be

Please sign in to comment.