Skip to content

Commit 6fa8bf8

Browse files
committed
Moved from manifest to buildx + fixes description-file
1 parent 9b98c01 commit 6fa8bf8

File tree

5 files changed

+16
-51
lines changed

5 files changed

+16
-51
lines changed

.github/workflows/main.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@ jobs:
1111
runs-on: ubuntu-latest
1212

1313
steps:
14-
- uses: actions/checkout@v1
14+
- uses: actions/checkout@v2
1515
- name: Installing dependencies
1616
run: |
1717
sudo apt update && sudo apt install make -y
18-
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
19-
docker run --rm --privileged multiarch/qemu-user-static:register
20-
sudo apt install -y qemu qemu-user-static qemu-user binfmt-support
2118
echo "${{ secrets.DOCKER_HUB_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_HUB_LOGIN }}" --password-stdin
19+
- name: install buildx
20+
id: buildx
21+
uses: crazy-max/ghaction-docker-buildx@v1
2222
- name: Build image
2323
run: make build-docker
2424
- name: Publish image
25-
run: make publish-docker latest
25+
run: make publish-docker

Dockerfile

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
FROM python:alpine3.11 as builder
1+
FROM python:alpine
22

3-
COPY qemu-*-static /usr/bin/
4-
5-
FROM builder
6-
7-
LABEL maintainer="Jay MOULIN <https://jaymoulin.me/femtopixel/docker-google-closure-compiler-api> <https://twitter.com/MoulinJay>"
3+
ARG TARGETPLATFORM
4+
ARG VERSION
5+
LABEL maintainer="Jay MOULIN <https://jaymoulin.me/femtopixel/docker-google-closure-compiler-api>"
6+
LABEL version=${VERSION}-${TARGETPLATFORM}
87

98
RUN pip install google-closure-compiler-api
109
COPY ./entrypoint.sh /bin/entrypoint

Makefile

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
VERSION ?= 0.1.5
22
CACHE ?= --no-cache=1
3-
FULLVERSION ?= 0.1.5
4-
archs ?= amd64 i386 arm64v8 arm32v6
53

6-
.PHONY: docker build-docker publish-docker latest
4+
.PHONY: docker build-docker publish-docker
75
test: install
86
twine upload -r testpypi dist/*
97
publish: install
@@ -19,19 +17,10 @@ dist:
1917
clean: build dist
2018
sudo rm -Rf build/*
2119
sudo rm -Rf dist/*
22-
docker: build-docker publish-docker latest
20+
21+
docker: build-docker publish-docker
2322
build-docker:
24-
cp /usr/bin/qemu-*-static .
25-
$(foreach arch,$(archs), \
26-
cat Dockerfile | sed "s/FROM python:alpine/FROM ${arch}\/python:alpine/g" > .Dockerfile; \
27-
docker build -t femtopixel/google-closure-compiler:${VERSION}-$(arch) -f .Dockerfile ${CACHE} .;\
28-
)
23+
docker buildx build --platform linux/arm/v7,linux/arm64/v8,linux/amd64,linux/386,linux/arm/v6 ${PUSH} --build-arg VERSION=${VERSION} --tag femtopixel/google-closure-compiler --tag femtopixel/google-closure-compiler:${VERSION} ${CACHE} .
2924
publish-docker:
30-
docker push femtopixel/google-closure-compiler -a
31-
cat manifest.yml | sed "s/\$$VERSION/${VERSION}/g" > manifest.yaml
32-
cat manifest.yaml | sed "s/\$$FULLVERSION/${FULLVERSION}/g" > manifest2.yaml
33-
mv manifest2.yaml manifest.yaml
34-
manifest-tool push from-spec manifest.yaml
35-
latest: build-docker
36-
FULLVERSION=latest VERSION=${VERSION} make publish-docker
25+
PUSH=--push CACHE= make build-docker
3726

manifest.yml

Lines changed: 0 additions & 23 deletions
This file was deleted.

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
[metadata]
2-
description-file = README.rst
2+
description_file = README.rst

0 commit comments

Comments
 (0)