Skip to content

Commit 65074cb

Browse files
authored
Merge pull request #5 from freeswitch/gha
[GHA] Migrate to new project layout.
2 parents 51d3cf8 + 9fd156a commit 65074cb

File tree

12 files changed

+435
-589
lines changed

12 files changed

+435
-589
lines changed

.github/docker/centos/7/amd64/Dockerfile

Lines changed: 0 additions & 102 deletions
This file was deleted.

.github/docker/debian/bookworm/amd64/Dockerfile

Lines changed: 50 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,29 @@
1-
ARG BUILDER_IMAGE=debian:bookworm
2-
ARG MAINTAINER="Andrey Volk <[email protected]>"
1+
ARG BUILDER_IMAGE=debian:bookworm-20240513
32

43
FROM ${BUILDER_IMAGE} AS builder
54

5+
ARG MAINTAINER_NAME="Andrey Volk"
6+
ARG MAINTAINER_EMAIL="[email protected]"
7+
8+
ARG CODENAME=bookworm
9+
ARG ARCH=amd64
10+
611
ARG BUILD_NUMBER=42
712
ARG GIT_SHA=0000000000
813

9-
MAINTAINER ${MAINTAINER}
14+
ARG DATA_DIR=/data
15+
16+
LABEL maintainer="${MAINTAINER_NAME} <${MAINTAINER_EMAIL}>"
1017

1118
SHELL ["/bin/bash", "-c"]
1219

13-
RUN apt-get -q update && \
14-
DEBIAN_FRONTEND=noninteractive apt-get -yq install \
20+
ENV DEBIAN_FRONTEND=noninteractive
21+
22+
RUN apt-get -q update \
23+
&& apt-get -y -q install \
1524
apt-transport-https \
25+
autoconf \
26+
automake \
1627
build-essential \
1728
ca-certificates \
1829
cmake \
@@ -22,6 +33,7 @@ RUN apt-get -q update && \
2233
dh-autoreconf \
2334
dos2unix \
2435
doxygen \
36+
dpkg-dev \
2537
git \
2638
graphviz \
2739
libglib2.0-dev \
@@ -32,35 +44,45 @@ RUN apt-get -q update && \
3244

3345
RUN update-ca-certificates --fresh
3446

35-
ENV DATA_DIR=/data
36-
WORKDIR ${DATA_DIR}
47+
RUN echo "export CODENAME=${CODENAME}" | tee ~/.env \
48+
&& echo "export ARCH=${ARCH}" | tee -a ~/.env \
49+
&& chmod +x ~/.env
3750

38-
COPY . ${DATA_DIR}
39-
RUN git reset --hard HEAD && git clean -xfd
51+
RUN git config --global --add safe.directory '*' \
52+
&& git config --global user.name "${MAINTAINER_NAME}" \
53+
&& git config --global user.email "${MAINTAINER_EMAIL}"
4054

41-
RUN echo "export CODENAME=$(lsb_release -sc | tr -d '\n')" | tee ~/.env && \
42-
chmod +x ~/.env
55+
# Bootstrap and Build
56+
COPY . ${DATA_DIR}
57+
WORKDIR ${DATA_DIR}
4358

44-
RUN git config --global --add safe.directory '*'
59+
RUN echo "export VERSION=$(dpkg-parsechangelog --show-field Version | cut -f1 -d'-')" \
60+
| tee -a ~/.env
4561

46-
# Bootstrap and Build
47-
RUN echo "export VERSION=$(dpkg-parsechangelog --show-field Version | cut -f1 -d'-')" | tee -a ~/.env
48-
RUN . ~/.env && dch \
49-
--controlmaint \
50-
--distribution "${CODENAME}" \
51-
--force-bad-version \
52-
--force-distribution \
53-
--newversion "${VERSION}-${BUILD_NUMBER}-${GIT_SHA}~${CODENAME}" \
54-
"Nightly build, ${GIT_SHA}"
55-
56-
RUN apt-get -q update && \
57-
mk-build-deps --install --remove debian/control --tool "apt-get -y --no-install-recommends" && \
58-
apt-get -y -f install
62+
RUN apt-get -q update \
63+
&& mk-build-deps \
64+
--install \
65+
--remove debian/control \
66+
--tool "apt-get -y --no-install-recommends" \
67+
&& apt-get -y -f install
5968

6069
ENV DEB_BUILD_OPTIONS="parallel=1"
61-
RUN . ~/.env && dch -b -M -v "${VERSION}-${BUILD_NUMBER}-${GIT_SHA}~${CODENAME}" \
62-
--force-distribution -D "${CODENAME}" "Nightly build, ${GIT_SHA}"
63-
RUN debuild -b -us -uc && mkdir OUT && mv -v ../*.deb OUT/.
70+
71+
RUN . ~/.env \
72+
&& dch \
73+
--controlmaint \
74+
--distribution "${CODENAME}" \
75+
--force-bad-version \
76+
--force-distribution \
77+
--newversion "${VERSION}-${BUILD_NUMBER}-${GIT_SHA}~${CODENAME}" \
78+
"Nightly build, ${GIT_SHA}" \
79+
&& debuild \
80+
--no-tgz-check \
81+
--build=binary \
82+
--unsigned-source \
83+
--unsigned-changes \
84+
&& mkdir OUT \
85+
&& mv -v ../*.{deb,changes} OUT/.
6486

6587
# Artifacts image (mandatory part, the resulting image must have a single filesystem layer)
6688
FROM scratch

.github/docker/debian/bookworm/arm32v7/Dockerfile

Lines changed: 51 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,29 @@
1-
ARG BUILDER_IMAGE=arm32v7/debian:bookworm
2-
ARG MAINTAINER="Andrey Volk <[email protected]>"
1+
ARG BUILDER_IMAGE=arm32v7/debian:bookworm-20240513
32

4-
FROM ${BUILDER_IMAGE} AS builder
3+
FROM --platform=linux/arm/v7 ${BUILDER_IMAGE} AS builder
4+
5+
ARG MAINTAINER_NAME="Andrey Volk"
6+
ARG MAINTAINER_EMAIL="[email protected]"
7+
8+
ARG CODENAME=bookworm
9+
ARG ARCH=arm32
510

611
ARG BUILD_NUMBER=42
712
ARG GIT_SHA=0000000000
813

9-
MAINTAINER ${MAINTAINER}
14+
ARG DATA_DIR=/data
15+
16+
LABEL maintainer="${MAINTAINER_NAME} <${MAINTAINER_EMAIL}>"
1017

1118
SHELL ["/bin/bash", "-c"]
1219

13-
RUN apt-get -q update && \
14-
DEBIAN_FRONTEND=noninteractive apt-get -yq install \
20+
ENV DEBIAN_FRONTEND=noninteractive
21+
22+
RUN apt-get -q update \
23+
&& apt-get -y -q install \
1524
apt-transport-https \
25+
autoconf \
26+
automake \
1627
build-essential \
1728
ca-certificates \
1829
cmake \
@@ -22,6 +33,7 @@ RUN apt-get -q update && \
2233
dh-autoreconf \
2334
dos2unix \
2435
doxygen \
36+
dpkg-dev \
2537
git \
2638
graphviz \
2739
libglib2.0-dev \
@@ -32,35 +44,45 @@ RUN apt-get -q update && \
3244

3345
RUN update-ca-certificates --fresh
3446

35-
ENV DATA_DIR=/data
36-
WORKDIR ${DATA_DIR}
47+
RUN echo "export CODENAME=${CODENAME}" | tee ~/.env \
48+
&& echo "export ARCH=${ARCH}" | tee -a ~/.env \
49+
&& chmod +x ~/.env
3750

38-
COPY . ${DATA_DIR}
39-
RUN git reset --hard HEAD && git clean -xfd
51+
RUN git config --global --add safe.directory '*' \
52+
&& git config --global user.name "${MAINTAINER_NAME}" \
53+
&& git config --global user.email "${MAINTAINER_EMAIL}"
4054

41-
RUN echo "export CODENAME=$(lsb_release -sc | tr -d '\n')" | tee ~/.env && \
42-
chmod +x ~/.env
55+
# Bootstrap and Build
56+
COPY . ${DATA_DIR}
57+
WORKDIR ${DATA_DIR}
4358

44-
RUN git config --global --add safe.directory '*'
59+
RUN echo "export VERSION=$(dpkg-parsechangelog --show-field Version | cut -f1 -d'-')" \
60+
| tee -a ~/.env
4561

46-
# Bootstrap and Build
47-
RUN echo "export VERSION=$(dpkg-parsechangelog --show-field Version | cut -f1 -d'-')" | tee -a ~/.env
48-
RUN . ~/.env && dch \
49-
--controlmaint \
50-
--distribution "${CODENAME}" \
51-
--force-bad-version \
52-
--force-distribution \
53-
--newversion "${VERSION}-${BUILD_NUMBER}-${GIT_SHA}~${CODENAME}" \
54-
"Nightly build, ${GIT_SHA}"
55-
56-
RUN apt-get -q update && \
57-
mk-build-deps --install --remove debian/control --tool "apt-get -y --no-install-recommends" && \
58-
apt-get -y -f install
62+
RUN apt-get -q update \
63+
&& mk-build-deps \
64+
--install \
65+
--remove debian/control \
66+
--tool "apt-get -y --no-install-recommends" \
67+
&& apt-get -y -f install
5968

6069
ENV DEB_BUILD_OPTIONS="parallel=1"
61-
RUN . ~/.env && dch -b -M -v "${VERSION}-${BUILD_NUMBER}-${GIT_SHA}~${CODENAME}" \
62-
--force-distribution -D "${CODENAME}" "Nightly build, ${GIT_SHA}"
63-
RUN debuild -b -us -uc && mkdir OUT && mv -v ../*.deb OUT/.
70+
71+
RUN . ~/.env \
72+
&& dch \
73+
--controlmaint \
74+
--distribution "${CODENAME}" \
75+
--force-bad-version \
76+
--force-distribution \
77+
--newversion "${VERSION}-${BUILD_NUMBER}-${GIT_SHA}~${CODENAME}" \
78+
"Nightly build, ${GIT_SHA}" \
79+
&& debuild \
80+
--no-tgz-check \
81+
--build=binary \
82+
--unsigned-source \
83+
--unsigned-changes \
84+
&& mkdir OUT \
85+
&& mv -v ../*.{deb,changes} OUT/.
6486

6587
# Artifacts image (mandatory part, the resulting image must have a single filesystem layer)
6688
FROM scratch

0 commit comments

Comments
 (0)