Skip to content

Commit 766062b

Browse files
authored
Merge pull request #85 from freeswitch/gha-packages
[GHA] Move to new project layout.
2 parents ab71241 + 4d0232a commit 766062b

35 files changed

+2183
-741
lines changed

Diff for: .github/docker/centos/7/amd64/Dockerfile

-102
This file was deleted.

Diff for: .github/docker/debian/bookworm/amd64/Dockerfile

-68
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
ARG BUILDER_IMAGE=debian:bookworm-20240513
2+
3+
FROM ${BUILDER_IMAGE} AS builder
4+
ARG MAINTAINER_NAME="Andrey Volk"
5+
ARG MAINTAINER_EMAIL="[email protected]"
6+
7+
ARG CODENAME=bookworm
8+
ARG ARCH=amd64
9+
10+
ARG BUILD_NUMBER=42
11+
ARG GIT_SHA=0000000000
12+
13+
ARG DATA_DIR=/data
14+
15+
LABEL maintainer="${MAINTAINER_NAME} <${MAINTAINER_EMAIL}>"
16+
17+
SHELL ["/bin/bash", "-c"]
18+
19+
ENV DEBIAN_FRONTEND=noninteractive
20+
21+
RUN apt-get -q update \
22+
&& apt-get -y -q install \
23+
apt-transport-https \
24+
autoconf \
25+
automake \
26+
build-essential \
27+
ca-certificates \
28+
cmake \
29+
curl \
30+
debhelper \
31+
devscripts \
32+
dh-autoreconf \
33+
docbook-xsl \
34+
dos2unix \
35+
doxygen \
36+
dpkg-dev \
37+
git \
38+
graphviz \
39+
libglib2.0-dev \
40+
libssl-dev \
41+
lsb-release \
42+
pkg-config \
43+
wget
44+
45+
RUN update-ca-certificates --fresh
46+
47+
RUN echo "export CODENAME=${CODENAME}" | tee ~/.env \
48+
&& echo "export ARCH=${ARCH}" | tee -a ~/.env \
49+
&& chmod +x ~/.env
50+
51+
RUN git config --global --add safe.directory '*' \
52+
&& git config --global user.name "${MAINTAINER_NAME}" \
53+
&& git config --global user.email "${MAINTAINER_EMAIL}"
54+
55+
# Bootstrap and Build
56+
COPY . ${DATA_DIR}
57+
WORKDIR ${DATA_DIR}
58+
59+
RUN echo "export VERSION=$(dpkg-parsechangelog --show-field Version | cut -f1 -d'-')" \
60+
| tee -a ~/.env
61+
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
68+
69+
ENV DEB_BUILD_OPTIONS="parallel=1"
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/.
86+
87+
# Artifacts image (mandatory part, the resulting image must have a single filesystem layer)
88+
FROM scratch
89+
COPY --from=builder /data/OUT/ /
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
ARG BUILDER_IMAGE=debian:bookworm-20240513
2+
3+
FROM ${BUILDER_IMAGE} AS builder
4+
ARG MAINTAINER_NAME="Andrey Volk"
5+
ARG MAINTAINER_EMAIL="[email protected]"
6+
7+
ARG CODENAME=bookworm
8+
ARG ARCH=amd64
9+
10+
ARG BUILD_NUMBER=42
11+
ARG GIT_SHA=0000000000
12+
13+
ARG DATA_DIR=/data
14+
15+
LABEL maintainer="${MAINTAINER_NAME} <${MAINTAINER_EMAIL}>"
16+
17+
SHELL ["/bin/bash", "-c"]
18+
19+
ENV DEBIAN_FRONTEND=noninteractive
20+
21+
RUN apt-get -q update \
22+
&& apt-get -y -q install \
23+
apt-transport-https \
24+
autoconf \
25+
automake \
26+
build-essential \
27+
ca-certificates \
28+
cmake \
29+
curl \
30+
debhelper \
31+
devscripts \
32+
dh-autoreconf \
33+
docbook-xsl \
34+
dos2unix \
35+
doxygen \
36+
dpkg-dev \
37+
git \
38+
graphviz \
39+
libglib2.0-dev \
40+
libssl-dev \
41+
lsb-release \
42+
pkg-config \
43+
wget
44+
45+
RUN update-ca-certificates --fresh
46+
47+
RUN echo "export CODENAME=${CODENAME}" | tee ~/.env \
48+
&& echo "export ARCH=${ARCH}" | tee -a ~/.env \
49+
&& chmod +x ~/.env
50+
51+
RUN git config --global --add safe.directory '*' \
52+
&& git config --global user.name "${MAINTAINER_NAME}" \
53+
&& git config --global user.email "${MAINTAINER_EMAIL}"
54+
55+
# Bootstrap and Build
56+
COPY . ${DATA_DIR}
57+
WORKDIR ${DATA_DIR}
58+
59+
RUN echo "export VERSION=$(dpkg-parsechangelog --show-field Version | cut -f1 -d'-')" \
60+
| tee -a ~/.env
61+
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
68+
69+
ENV DEB_BUILD_OPTIONS="parallel=1"
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/.
86+
87+
# Artifacts image (mandatory part, the resulting image must have a single filesystem layer)
88+
FROM scratch
89+
COPY --from=builder /data/OUT/ /

0 commit comments

Comments
 (0)