11name : test
22
3- on :
4- push :
3+ on :
4+ push :
55 branches :
6+ - master
7+ - lts
8+ - lts-dev
9+ - current
10+ - current-dev
611 pull_request :
712 schedule :
813 - cron : ' 0 0 * * SUN'
@@ -13,6 +18,11 @@ defaults:
1318 run :
1419 shell : bash
1520
21+ # cancel previous runs if new commits are pushed to the PR, but run for each commit on master
22+ concurrency :
23+ group : ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
24+ cancel-in-progress : true
25+
1626jobs :
1727 self-trigger :
1828 runs-on : ubuntu-latest
4353 run : |
4454 echo "CACHE_ROOT=$HOME/cache-root" >> $GITHUB_ENV
4555
46- - uses : actions/checkout@v2
56+ - uses : actions/checkout@v4
4757 with :
4858 ref : ${{ github.ref }}
4959
6979 if : steps.cache-deps.outputs.cache-hit != 'true'
7080 run : |
7181 sudo apt-get --yes update
82+ # https://github.com/actions/runner-images/issues/2139
83+ sudo apt-get remove nginx-core nginx-full nginx-light nginx-extras
84+ sudo apt-get remove libgd3
7285 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
7386
7487 - name : Download and install ModSecurity
@@ -115,7 +128,7 @@ jobs:
115128 python-version : ' 3.x'
116129 architecture : ' x64'
117130
118- - uses : actions/checkout@v2
131+ - uses : actions/checkout@v4
119132 with :
120133 ref : ${{ github.ref }}
121134
@@ -143,6 +156,9 @@ jobs:
143156 - name : Install dependencies
144157 run : |
145158 sudo apt-get --yes update
159+ # https://github.com/actions/runner-images/issues/2139
160+ sudo apt-get remove nginx-core nginx-full nginx-light nginx-extras
161+ sudo apt-get remove libgd3
146162 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
147163
148164 - name : Download nginx-${{ matrix.nginx-version }}
@@ -222,21 +238,21 @@ jobs:
222238 version : ['stable', 'mainline']
223239 target : ['glibc', 'musl']
224240 steps :
225- - uses : actions/checkout@v2
241+ - uses : actions/checkout@v4
226242 with :
227243 ref : ${{ github.ref }}
228244 - name : Set up QEMU
229- uses : docker/setup-qemu-action@v1
245+ uses : docker/setup-qemu-action@v3
230246 - name : Set up Docker Buildx
231- uses : docker/setup-buildx-action@v1
247+ uses : docker/setup-buildx-action@v3
232248 - name : Build module
233249 run : docker build --file docker/Dockerfile.${{ matrix.target }} --build-arg=NGX_VER=${{ matrix.version }} .
234250 triger :
235251 runs-on : ubuntu-latest
236252 if : ${{ github.event_name == 'workflow_dispatch' || (github.event_name == 'push' && (github.ref == 'refs/heads/lts' || github.ref == 'refs/heads/current')) }}
237253 needs : ['native', 'docker']
238254 steps :
239- - uses : actions/checkout@v2
255+ - uses : actions/checkout@v4
240256 with :
241257 ref : ${{ github.ref }}
242258 - uses : actions/setup-python@v2
0 commit comments