Fixes more templating issues.

This commit is contained in:
Viktor Petersson
2023-02-15 16:31:39 +00:00
parent 8542e8f676
commit 052b641f3a
3 changed files with 11 additions and 6 deletions

View File

@@ -95,6 +95,8 @@ jobs:
fi
echo "DOCKER_TAG=$DOCKER_TAG" >> $GITHUB_ENV
echo "GIT_SHORT_HASH=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
echo "GIT_BRANCH=$GITHUB_REF_NAME" >> $GITHUB_ENV
echo "GIT_HASH=$GITHUB_SHA" >> $GITHUB_ENV
- name: Build containers
run: |
@@ -108,9 +110,9 @@ jobs:
--output "type=image,push=true" \
--build-arg "PI_VERSION=${{ matrix.board }}" \
--build-arg "BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" \
--build-arg "GIT_HASH=$GITHUB_SHA" \
--build-arg "GIT_HASH=$GITHUB_HASH" \
--build-arg "GIT_SHORT_HASH=$GIT_SHORT_HASH" \
--build-arg "GIT_BRANCH=$GITHUB_REF_NAME" \
--build-arg "GIT_BRANCH=$GITHUB_BRANCH" \
--cache-from "type=local,src=/tmp/.buildx-cache" \
--cache-from "type=registry,ref=screenly/srly-ose-$container:$DOCKER_TAG" \
--cache-to "type=local,dest=/tmp/.buildx-cache" \

View File

@@ -34,6 +34,9 @@ fi
export BASE_IMAGE_TAG=buster
export DEBIAN_VERSION=buster
export QT_VERSION=5.15.2
export GIT_SHORT_HASH="$(git rev-parse --short HEAD)"
export GIT_BRANCH="$(git rev-parse --abbrev-ref HEAD)"
export GIT_HASH="$(git rev-parse HEAD)"
export WEBVIEW_GIT_HASH=0b6d49359133246659b9ba1d8dd883e3fc5c9a91
export WEBVIEW_BASE_URL="https://github.com/Screenly/Anthias/releases/download/WebView-v0.2.1"
@@ -60,8 +63,8 @@ for pi_version in pi4 pi3 pi2 pi1; do
docker "${DOCKER_BUILD_ARGS[@]}" \
--build-arg "GIT_HASH=$GIT_HASH" \
--build-arg "GIT_SHORT_HASH=$GIT_SHORT_HASH" \
--build-arg "GIT_BRANCH=$GIT_BRANCH" \
--build-arg "GIT_SHORT_HASH=$GIT_SHORT_HASH" \
--build-arg "PI_VERSION=$pi_version" \
--cache-from "type=local,src=/tmp/.buildx-cache" \
--cache-from "type=registry,ref=screenly/srly-ose-$container:$DOCKER_TAG" \

View File

@@ -1,9 +1,9 @@
FROM ${BASE_IMAGE}:${BASE_IMAGE_TAG}
RUN apt-get update && \
RUN --mount=type=cache,target=/var/cache/apt \
apt-get update && \
apt-get -y install --no-install-recommends \
redis-server && \
apt-get clean
redis-server
ARG GIT_HASH
ENV GIT_HASH=$GIT_HASH