use submodule

This commit is contained in:
Dmitry Belyaev 2020-02-02 23:35:13 +03:00
parent ab6974f7b7
commit 88d7aa0bf5
Signed by: b4tman
GPG Key ID: 41A00BF15EA7E5F3
4 changed files with 22 additions and 23 deletions

View File

@ -19,6 +19,13 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Checkout submodules
shell: bash
run: |
auth_header="$(git config --local --get http.https://github.com/.extraheader)"
git submodule sync --recursive
git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1
- name: Build squid image
run: docker build . --file Dockerfile --tag b4tman/squid
@ -35,6 +42,13 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Checkout submodules
shell: bash
run: |
auth_header="$(git config --local --get http.https://github.com/.extraheader)"
git submodule sync --recursive
git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1
- name: Build squid image
run: docker build . --file Dockerfile --tag b4tman/squid

4
.gitmodules vendored Normal file
View File

@ -0,0 +1,4 @@
[submodule "squid"]
path = squid
url = https://github.com/squid-cache/squid
branch = v5

View File

@ -1,8 +1,5 @@
FROM alpine:3.11.3 as build
ENV SQUID_VER 5.0.1
ENV SQUID_SIG_KEY B06884EDB779C89B044E64E3CD6DBF8EF3B17D3E
RUN set -x && \
apk add --no-cache \
gcc \
@ -21,26 +18,10 @@ RUN set -x && \
libcap-dev \
linux-headers
COPY squid/ /tmp/build/
WORKDIR /tmp/build/
RUN set -x && \
mkdir -p /tmp/build && \
cd /tmp/build && \
curl -SsL http://www.squid-cache.org/Versions/v${SQUID_VER%%.*}/squid-${SQUID_VER}.tar.gz -o squid-${SQUID_VER}.tar.gz && \
curl -SsL http://www.squid-cache.org/Versions/v${SQUID_VER%%.*}/squid-${SQUID_VER}.tar.gz.asc -o squid-${SQUID_VER}.tar.gz.asc
RUN set -x && \
cd /tmp/build && \
export GNUPGHOME="$(mktemp -d)" && \
( \
gpg --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys ${SQUID_SIG_KEY} || \
gpg --keyserver hkp://ipv4.pool.sks-keyservers.net --recv-keys ${SQUID_SIG_KEY} || \
gpg --keyserver hkp://pgp.mit.edu:80 --recv-keys ${SQUID_SIG_KEY} \
) && \
gpg --batch --verify squid-${SQUID_VER}.tar.gz.asc squid-${SQUID_VER}.tar.gz && \
rm -rf "$GNUPGHOME"
RUN set -x && \
cd /tmp/build && \
tar --strip 1 -xzf squid-${SQUID_VER}.tar.gz && \
\
CFLAGS="-g0 -O2" \
CXXFLAGS="-g0 -O2" \
@ -94,7 +75,6 @@ RUN set -x && \
--with-pidfile=/var/run/squid/squid.pid
RUN set -x && \
cd /tmp/build && \
make -j $(grep -cs ^processor /proc/cpuinfo) && \
make install

1
squid Submodule

@ -0,0 +1 @@
Subproject commit 8a511d5e05aa17b47c7566839fd9c524512489d3