Skip to content

Commit

Permalink
Fix github commit sha
Browse files Browse the repository at this point in the history
  • Loading branch information
theyosh committed May 3, 2022
1 parent 74121dd commit dadc48d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ RUN apt-get update && apt-get install -y --no-install-recommends libusb-dev && \

# python builder, help keep image small
FROM python:3.8-buster as python_builder
ARG GITHUB_SHA=${GITHUB_SHA}

ENV DEBIAN_FRONTEND=noninteractive
# These two environment variables prevent __pycache__/ files.
ENV PYTHONUNBUFFERED=1
Expand Down
8 changes: 6 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
IMAGE ?= theyosh/terrariumpi
VERSION ?= $(shell grep -E "__version__ = '(.*)'" terrariumPI.py | grep -Po [0-9\.]+)
GITHUB_SHA ?= $(shell git rev-parse HEAD)


.PHONY: build run logs

Expand All @@ -11,15 +13,17 @@ build:
--progress=plain \
--platform linux/arm/v7 \
-t $(IMAGE):$(VERSION) \
--build-arg GITHUB_SHA=${GITHUB_SHA} \
-f Dockerfile \
.

push:
docker run --privileged docker/binfmt:a7996909642ee92942dcd6cff44b9b95f08dad64
docker buildx build \
GITHUB_SHA=${GITHUB_SHA} docker buildx build \
--progress=plain \
--platform linux/arm/v7 \
-t $(IMAGE):$(VERSION) \
--build-arg GITHUB_SHA=${GITHUB_SHA} \
-f Dockerfile \
--push \
.
Expand All @@ -36,4 +40,4 @@ logs:

docs:
bundle install
cd docs && jekyll serve
cd docs && jekyll serve

0 comments on commit dadc48d

Please sign in to comment.