Skip to content

Commit

Permalink
chore(CI): fix broken deps
Browse files Browse the repository at this point in the history
  • Loading branch information
ADD-SP committed Oct 6, 2023
1 parent 02dc08c commit 7a65242
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 14 deletions.
13 changes: 12 additions & 1 deletion .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
name: codecov

on: [push]
on: [pull_request]

defaults:
run:
shell: bash

# cancel previous runs if new commits are pushed to the PR, but run for each commit on master
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
build_deps:
name: Build dependencies
Expand Down Expand Up @@ -45,6 +50,9 @@ jobs:
if: steps.cache-deps.outputs.cache-hit != 'true'
run: |
sudo apt-get --yes update
# https://github.com/actions/runner-images/issues/2139
sudo apt-get remove nginx-core nginx-full nginx-light nginx-extras
sudo apt-get remove libgd3
sudo apt-get install --yes libsodium23 libsodium-dev build-essential zlib1g-dev libpcre3 libpcre3-dev libssl-dev libxslt1-dev libxml2-dev libgeoip-dev libgd-dev libperl-dev libcurl4-openssl-dev
- name: Download and install ModSecurity
Expand Down Expand Up @@ -111,6 +119,9 @@ jobs:
- name: Install dependencies
run: |
sudo apt-get --yes update
# https://github.com/actions/runner-images/issues/2139
sudo apt-get remove nginx-core nginx-full nginx-light nginx-extras
sudo apt-get remove libgd3
sudo apt-get install --yes libsodium23 libsodium-dev build-essential zlib1g-dev libpcre3 libpcre3-dev libssl-dev libxslt1-dev libxml2-dev libgeoip-dev libgd-dev libperl-dev libcurl4-openssl-dev gcovr
- name: Download nginx
Expand Down
15 changes: 12 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
name: test

on:
push:
branches:
on:
pull_request:
schedule:
- cron: '0 0 * * SUN'
Expand All @@ -13,6 +11,11 @@ defaults:
run:
shell: bash

# cancel previous runs if new commits are pushed to the PR, but run for each commit on master
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
self-trigger:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -69,6 +72,9 @@ jobs:
if: steps.cache-deps.outputs.cache-hit != 'true'
run: |
sudo apt-get --yes update
# https://github.com/actions/runner-images/issues/2139
sudo apt-get remove nginx-core nginx-full nginx-light nginx-extras
sudo apt-get remove libgd3
sudo apt-get install --yes libsodium23 libsodium-dev build-essential zlib1g-dev libpcre3 libpcre3-dev libssl-dev libxslt1-dev libxml2-dev libgeoip-dev libgd-dev libperl-dev libcurl4-openssl-dev
- name: Download and install ModSecurity
Expand Down Expand Up @@ -143,6 +149,9 @@ jobs:
- name: Install dependencies
run: |
sudo apt-get --yes update
# https://github.com/actions/runner-images/issues/2139
sudo apt-get remove nginx-core nginx-full nginx-light nginx-extras
sudo apt-get remove libgd3
sudo apt-get install --yes libsodium23 libsodium-dev build-essential zlib1g-dev libpcre3 libpcre3-dev libssl-dev libxslt1-dev libxml2-dev libgeoip-dev libgd-dev libperl-dev libcurl4-openssl-dev
- name: Download nginx-${{ matrix.nginx-version }}
Expand Down
12 changes: 6 additions & 6 deletions docker/Dockerfile.glibc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
ARG NGX_VER=stable
FROM nginx:${NGX_VER} as base
ARG CHANGE_SOURCE=false
ARG CN_MIRROR=false
ARG NGX_VER=stable
ARG LIB_SODIUM_VER=1.0.18-RELEASE

Expand All @@ -9,7 +9,7 @@ COPY . ./ngx_waf

SHELL ["/bin/bash", "-o", "pipefail", "-c"]
RUN set -xe \
&& if [ ${CHANGE_SOURCE} == true ] ; then \
&& if [ ${CN_MIRROR} == true ] ; then \
cp ./ngx_waf/docker/sources.list /etc/apt/sources.list ; \
apt-get clean all ; \
fi \
Expand All @@ -30,7 +30,7 @@ RUN set -xe \
libgd-dev \
libperl-dev \
libcurl4-openssl-dev \
python3 \
python3-full \
python3-pip \
libtool \
autoconf \
Expand All @@ -41,10 +41,10 @@ RUN set -xe \
libmodsecurity3 \
flex \
bison \
&& if [ ${CHANGE_SOURCE} == true ] ; then \
pip3 config set global.index-url https://mirrors.cloud.tencent.com/pypi/simple ; \
&& if [ ${CN_MIRROR} == true ] ; then \
pip config set global.index-url https://mirrors.cloud.tencent.com/pypi/simple ; \
fi \
&& pip3 install lastversion
&& pip3 install lastversion || pip3 install lastversion --break-system-packages

RUN set -xe \
&& git clone -b v1.7.15 https://github.com/DaveGamble/cJSON.git ngx_waf/lib/cjson
Expand Down
8 changes: 4 additions & 4 deletions docker/Dockerfile.musl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ FROM owasp/modsecurity:3.0.5-alpine AS modsecurity

ARG NGX_VER=stable
FROM nginx:${NGX_VER}-alpine as base
ARG CHANGE_SOURCE=false
ARG CN_MIRROR=false
ARG NGX_VER=stable
ARG LIB_SODIUM_VER=1.0.18-RELEASE
ARG MODSEC_VERSION=v3.0.5
Expand All @@ -17,7 +17,7 @@ COPY --from=modsecurity /usr/local/modsecurity/ /usr/local/modsecurity/

SHELL ["/bin/sh", "-o", "pipefail", "-c"]
RUN set -xe \
&& if [ ${CHANGE_SOURCE} = true ]; then \
&& if [ ${CN_MIRROR} = true ]; then \
sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/' /etc/apk/repositories ; \
fi \
&& apk update \
Expand Down Expand Up @@ -46,10 +46,10 @@ RUN set -xe \
libmaxminddb \
flex \
bison \
&& if [ ${CHANGE_SOURCE} = true ]; then \
&& if [ ${CN_MIRROR} = true ]; then \
pip3 config set global.index-url https://mirrors.cloud.tencent.com/pypi/simple ; \
fi \
&& pip3 install lastversion
&& pip3 install lastversion || pip3 install lastversion --break-system-packages

RUN set -xe \
&& git clone https://github.com/DaveGamble/cJSON.git --branch ${CJSON_VERSION} ngx_waf/lib/cjson
Expand Down

0 comments on commit 7a65242

Please sign in to comment.