Skip to content

Commit

Permalink
Moved from manifest to buildx + fixes description-file
Browse files Browse the repository at this point in the history
  • Loading branch information
jaymoulin committed May 2, 2024
1 parent 9b98c01 commit 87b0fa4
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 51 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-docker
- name: Publish image
run: make publish-docker latest
run: make publish-docker
8 changes: 2 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
FROM python:alpine3.11 as builder
FROM python:alpine

COPY qemu-*-static /usr/bin/

FROM builder

LABEL maintainer="Jay MOULIN <https://jaymoulin.me/femtopixel/docker-google-closure-compiler-api> <https://twitter.com/MoulinJay>"
LABEL maintainer="Jay MOULIN <https://jaymoulin.me/femtopixel/docker-google-closure-compiler-api>"

RUN pip install google-closure-compiler-api
COPY ./entrypoint.sh /bin/entrypoint
Expand Down
21 changes: 5 additions & 16 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
VERSION ?= 0.1.5
CACHE ?= --no-cache=1
FULLVERSION ?= 0.1.5
archs ?= amd64 i386 arm64v8 arm32v6

.PHONY: docker build-docker publish-docker latest
.PHONY: docker build-docker publish-docker
test: install
twine upload -r testpypi dist/*
publish: install
Expand All @@ -19,19 +17,10 @@ dist:
clean: build dist
sudo rm -Rf build/*
sudo rm -Rf dist/*
docker: build-docker publish-docker latest

docker: build-docker publish-docker
build-docker:
cp /usr/bin/qemu-*-static .
$(foreach arch,$(archs), \
cat Dockerfile | sed "s/FROM python:alpine/FROM ${arch}\/python:alpine/g" > .Dockerfile; \
docker build -t femtopixel/google-closure-compiler:${VERSION}-$(arch) -f .Dockerfile ${CACHE} .;\
)
docker buildx build --platform linux/arm/v7,linux/arm64/v8,linux/amd64,linux/386,linux/arm/v6 ${PUSH} --tag femtopixel/google-closure-compiler --tag femtopixel/google-closure-compiler:${VERSION} ${CACHE} .
publish-docker:
docker push femtopixel/google-closure-compiler -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-docker
FULLVERSION=latest VERSION=${VERSION} make publish-docker
PUSH=--push CACHE= make build

23 changes: 0 additions & 23 deletions manifest.yml

This file was deleted.

2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[metadata]
description-file = README.rst
description_file = README.rst

0 comments on commit 87b0fa4

Please sign in to comment.