Merge pull request #15035 from hartwork/dockerfile-fix-build

Dockerfile: Fix the build, package gh exists in Ubuntu >=22 only
This commit is contained in:
Mike McQuaid 2023-03-24 08:44:31 +00:00 committed by GitHub
commit 7b4de4ad1f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

View File

@ -1,5 +1,9 @@
name: Docker
on:
pull_request:
paths:
- .github/workflows/docker.yml
- Dockerfile
push:
paths:
- .github/workflows/docker.yml

View File

@ -37,7 +37,8 @@ RUN apt-get update \
uuid-runtime \
tzdata \
jq \
&& if [ "$(. /etc/lsb-release; echo "${DISTRIB_RELEASE}" | cut -d. -f1)" -ge 18 ]; then apt-get install -y --no-install-recommends gh gpg skopeo; fi \
&& if [ "$(. /etc/lsb-release; echo "${DISTRIB_RELEASE}" | cut -d. -f1)" -ge 18 ]; then apt-get install -y --no-install-recommends gpg; fi \
&& if [ "$(. /etc/lsb-release; echo "${DISTRIB_RELEASE}" | cut -d. -f1)" -ge 22 ]; then apt-get install -y --no-install-recommends gh skopeo; fi \
&& apt-get remove --purge -y software-properties-common \
&& apt-get autoremove --purge -y \
&& rm -rf /var/lib/apt/lists/* \