Skip to content

Commit

Permalink
Moved from manifest to buildx (premises)
Browse files Browse the repository at this point in the history
  • Loading branch information
jaymoulin committed May 1, 2024
1 parent 1150ec0 commit eae9989
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 49 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.

3 changes: 1 addition & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
FROM docker
COPY qemu-* /usr/bin/
ENV PORT=80
RUN apk add git openssh make python3 ca-certificates gnupg --update --no-cache
RUN apk add git openssh make python3 py3-pip ca-certificates gnupg --update --no-cache
WORKDIR /root
COPY ./daemon.py /usr/bin/mydaemon
EXPOSE 80
Expand Down
27 changes: 6 additions & 21 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,24 +1,9 @@
VERSION ?= v0.2.0
VERSION ?= v0.2.1
CACHE ?= --no-cache=1
FULLVERSION ?= ${VERSION}
archs ?= amd64 arm64v8 arm32v6

.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-arm-static qemu-aarch64-static
$(foreach arch,$(archs), \
cat Dockerfile | sed "s/FROM docker/FROM ${arch}\/docker/g" > .Dockerfile; \
docker build -t femtopixel/builder:${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 ${PUSH} --tag femtopixel/builder --tag femtopixel/builder:${VERSION} ${CACHE} .
publish:
docker push femtopixel/builder -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
18 changes: 0 additions & 18 deletions manifest.yml

This file was deleted.

0 comments on commit eae9989

Please sign in to comment.