mirror of
https://github.com/Llewellynvdm/conky.git
synced 2024-06-02 07:20:47 +00:00
Compare commits
9 Commits
28a63989ab
...
a03f0bc562
Author | SHA1 | Date | |
---|---|---|---|
|
a03f0bc562 | ||
|
89e8fe580e | ||
|
2578be2447 | ||
|
a5cc142bba | ||
|
6a248a94d2 | ||
|
9dfc7318f9 | ||
|
8ba6cf625c | ||
|
35d72314d2 | ||
|
a533bcb8e4 |
45
.github/scripts/docker-build.bash
vendored
Executable file
45
.github/scripts/docker-build.bash
vendored
Executable file
|
@ -0,0 +1,45 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
set -ex
|
||||||
|
|
||||||
|
DOCKERHUB_IMAGE_ID=$DOCKERHUB_ACCOUNT/$IMAGE_NAME
|
||||||
|
|
||||||
|
# Change all uppercase to lowercase
|
||||||
|
DOCKERHUB_IMAGE_ID=$(echo $DOCKERHUB_IMAGE_ID | tr '[A-Z]' '[a-z]')
|
||||||
|
|
||||||
|
image_tags=()
|
||||||
|
|
||||||
|
# Strip git ref prefix from version
|
||||||
|
VERSION_TAG=$(echo $GITHUB_REF | sed -e 's,.*/\(.*\),\1,')
|
||||||
|
|
||||||
|
# Strip "v" prefix from tag name
|
||||||
|
if [[ "$GITHUB_REF" == refs/tags/* ]]; then
|
||||||
|
VERSION_TAG=$(echo $VERSION_TAG | sed -e 's/^v//')
|
||||||
|
fi
|
||||||
|
|
||||||
|
image_tags+=("--tag" "$DOCKERHUB_IMAGE_ID:$VERSION_TAG")
|
||||||
|
|
||||||
|
# tag as latest on releases
|
||||||
|
if [[ "$RELEASE" == ON ]]; then
|
||||||
|
image_tags+=("--tag" "$DOCKERHUB_IMAGE_ID:latest")
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Only build amd64 on PRs, build all platforms on main. The arm builds
|
||||||
|
# take far too long.
|
||||||
|
image_platforms="--platform linux/amd64"
|
||||||
|
push_image=""
|
||||||
|
cache_tag="pr-cache"
|
||||||
|
|
||||||
|
# Only push on main
|
||||||
|
if [[ "$GITHUB_REF" == refs/heads/main ]]; then
|
||||||
|
push_image="--push"
|
||||||
|
image_platforms="--platform linux/arm/v7,linux/arm64/v8,linux/amd64"
|
||||||
|
cache_tag="main-cache"
|
||||||
|
fi
|
||||||
|
|
||||||
|
docker buildx build \
|
||||||
|
${push_image} \
|
||||||
|
${image_platforms} \
|
||||||
|
--cache-from=type=registry,ref=$DOCKERHUB_ACCOUNT/$IMAGE_NAME:$cache_tag \
|
||||||
|
--cache-to=type=registry,ref=$DOCKERHUB_ACCOUNT/$IMAGE_NAME:$cache_tag,mode=max \
|
||||||
|
"${image_tags[@]}" \
|
||||||
|
.
|
38
.github/workflows/docker.yaml
vendored
38
.github/workflows/docker.yaml
vendored
|
@ -2,7 +2,13 @@ name: Docker
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
# Publish `main` as Docker `latest` image.
|
branches:
|
||||||
|
- main
|
||||||
|
paths-ignore:
|
||||||
|
- web/**
|
||||||
|
- doc/**
|
||||||
|
|
||||||
|
pull_request:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
paths-ignore:
|
paths-ignore:
|
||||||
|
@ -23,7 +29,7 @@ env:
|
||||||
DOCKER_BUILDKIT: 1
|
DOCKER_BUILDKIT: 1
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
buildx:
|
docker-buildx:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
|
@ -35,26 +41,8 @@ jobs:
|
||||||
uses: docker/setup-buildx-action@v3
|
uses: docker/setup-buildx-action@v3
|
||||||
- name: Log into Dockerhub registry
|
- name: Log into Dockerhub registry
|
||||||
run: echo "${{ secrets.DOCKERHUB_TOKEN }}" | docker login -u $DOCKERHUB_ACCOUNT --password-stdin
|
run: echo "${{ secrets.DOCKERHUB_TOKEN }}" | docker login -u $DOCKERHUB_ACCOUNT --password-stdin
|
||||||
- name: Build
|
- name: Build and push Docker image
|
||||||
run: |
|
env:
|
||||||
DOCKERHUB_IMAGE_ID=$DOCKERHUB_ACCOUNT/$IMAGE_NAME
|
RELEASE: "${{ startsWith(github.ref, 'refs/tags/') && 'ON' || 'OFF' }}"
|
||||||
|
GITHUB_REF: ${{ github.ref }}
|
||||||
# Change all uppercase to lowercase
|
run: ./.github/scripts/docker-build.bash
|
||||||
DOCKERHUB_IMAGE_ID=$(echo $DOCKERHUB_IMAGE_ID | tr '[A-Z]' '[a-z]')
|
|
||||||
|
|
||||||
# Strip git ref prefix from version
|
|
||||||
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
|
|
||||||
|
|
||||||
# Strip "v" prefix from tag name
|
|
||||||
[[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//')
|
|
||||||
|
|
||||||
# Use Docker `latest` tag convention
|
|
||||||
[ "$VERSION" == "main" ] && VERSION=latest
|
|
||||||
|
|
||||||
docker buildx build \
|
|
||||||
--push \
|
|
||||||
--platform linux/arm/v7,linux/arm64/v8,linux/amd64 \
|
|
||||||
--cache-from=type=registry,ref=$DOCKERHUB_ACCOUNT/$IMAGE_NAME:buildcache \
|
|
||||||
--cache-to=type=registry,ref=$DOCKERHUB_ACCOUNT/$IMAGE_NAME:buildcache,mode=max \
|
|
||||||
--tag $DOCKERHUB_IMAGE_ID:$VERSION \
|
|
||||||
.
|
|
||||||
|
|
30
Dockerfile
30
Dockerfile
|
@ -1,4 +1,4 @@
|
||||||
FROM ubuntu:jammy AS builder
|
FROM ubuntu:noble AS builder
|
||||||
|
|
||||||
RUN apt-get update \
|
RUN apt-get update \
|
||||||
&& DEBIAN_FRONTEND=noninteractive \
|
&& DEBIAN_FRONTEND=noninteractive \
|
||||||
|
@ -6,6 +6,7 @@ RUN apt-get update \
|
||||||
audacious-dev \
|
audacious-dev \
|
||||||
ca-certificates \
|
ca-certificates \
|
||||||
clang \
|
clang \
|
||||||
|
cmake \
|
||||||
curl \
|
curl \
|
||||||
gfortran \
|
gfortran \
|
||||||
git \
|
git \
|
||||||
|
@ -39,25 +40,11 @@ RUN apt-get update \
|
||||||
libxml2-dev \
|
libxml2-dev \
|
||||||
libxmmsclient-dev \
|
libxmmsclient-dev \
|
||||||
libxnvctrl-dev \
|
libxnvctrl-dev \
|
||||||
make \
|
|
||||||
ninja-build \
|
ninja-build \
|
||||||
patch \
|
patch \
|
||||||
&& apt-get clean \
|
&& apt-get clean \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
# Compile CMake, we need the latest because the bug here (for armv7 builds):
|
|
||||||
# https://gitlab.kitware.com/cmake/cmake/-/issues/20568
|
|
||||||
WORKDIR /cmake
|
|
||||||
ENV CMAKE_VERSION 3.25.1
|
|
||||||
RUN curl -Lq https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}.tar.gz -o cmake-${CMAKE_VERSION}.tar.gz \
|
|
||||||
&& tar xf cmake-${CMAKE_VERSION}.tar.gz \
|
|
||||||
&& cd cmake-${CMAKE_VERSION} \
|
|
||||||
&& CC=clang CXX=clang++ CFLAGS="-D_FILE_OFFSET_BITS=64" CXXFLAGS="-D_FILE_OFFSET_BITS=64" ./bootstrap --system-libs --parallel=5 \
|
|
||||||
&& make -j5 \
|
|
||||||
&& make -j5 install \
|
|
||||||
&& cd \
|
|
||||||
&& rm -rf /cmake
|
|
||||||
|
|
||||||
COPY . /conky
|
COPY . /conky
|
||||||
WORKDIR /conky/build
|
WORKDIR /conky/build
|
||||||
|
|
||||||
|
@ -112,7 +99,7 @@ RUN sh -c 'if [ "$X11" = "yes" ] ; then \
|
||||||
&& cmake --build . \
|
&& cmake --build . \
|
||||||
&& cmake --install .
|
&& cmake --install .
|
||||||
|
|
||||||
FROM ubuntu:jammy
|
FROM ubuntu:noble
|
||||||
|
|
||||||
RUN apt-get update \
|
RUN apt-get update \
|
||||||
&& DEBIAN_FRONTEND=noninteractive \
|
&& DEBIAN_FRONTEND=noninteractive \
|
||||||
|
@ -121,14 +108,14 @@ RUN apt-get update \
|
||||||
libc++1 \
|
libc++1 \
|
||||||
libc++abi1 \
|
libc++abi1 \
|
||||||
libcairo2 \
|
libcairo2 \
|
||||||
libcurl4 \
|
libcurl4t64 \
|
||||||
libdbus-glib-1-2 \
|
libdbus-glib-1-2 \
|
||||||
libical3 \
|
libical3t64 \
|
||||||
libimlib2 \
|
libimlib2t64 \
|
||||||
libircclient1 \
|
libircclient1 \
|
||||||
libiw30 \
|
libiw30t64 \
|
||||||
liblua5.3-0 \
|
liblua5.3-0 \
|
||||||
libmicrohttpd12 \
|
libmicrohttpd12t64 \
|
||||||
libmysqlclient21 \
|
libmysqlclient21 \
|
||||||
libncurses6 \
|
libncurses6 \
|
||||||
libpulse0 \
|
libpulse0 \
|
||||||
|
@ -140,6 +127,7 @@ RUN apt-get update \
|
||||||
libxext6 \
|
libxext6 \
|
||||||
libxfixes3 \
|
libxfixes3 \
|
||||||
libxft2 \
|
libxft2 \
|
||||||
|
libxi6 \
|
||||||
libxinerama1 \
|
libxinerama1 \
|
||||||
libxml2 \
|
libxml2 \
|
||||||
libxmmsclient6 \
|
libxmmsclient6 \
|
||||||
|
|
|
@ -132,8 +132,8 @@ endif(OS_HAIKU)
|
||||||
|
|
||||||
# Do version stuff
|
# Do version stuff
|
||||||
set(VERSION_MAJOR "1")
|
set(VERSION_MAJOR "1")
|
||||||
set(VERSION_MINOR "20")
|
set(VERSION_MINOR "21")
|
||||||
set(VERSION_PATCH "3")
|
set(VERSION_PATCH "0")
|
||||||
|
|
||||||
find_program(APP_AWK awk)
|
find_program(APP_AWK awk)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user