File tree Expand file tree Collapse file tree 3 files changed +43
-0
lines changed Expand file tree Collapse file tree 3 files changed +43
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Deploy nightly build
2
+
3
+ on :
4
+ schedule :
5
+ - cron : ' 0 2 * * *' # Run at 2 AM UTC every day
6
+ push :
7
+ branches :
8
+ - main
9
+ workflow_dispatch : # Manual trigger
10
+
11
+ jobs :
12
+ deploy-nightly :
13
+ runs-on : ubuntu-latest
14
+ steps :
15
+ - uses : actions/checkout@v4
16
+ # We intentionally don't set `persist-credentials` to `false` because we
17
+ # want to push to the nightly branch. This is safe because we only use
18
+ # our own commands and there are no external actions beyond this point.
19
+
20
+ - name : Configure git
21
+ run : |
22
+ git config user.name "github-actions[bot]"
23
+ git config user.email "github-actions[bot]@users.noreply.github.com"
24
+
25
+ - name : Update heroku.yml
26
+ run : |
27
+ sed -i 's/NIGHTLY: 0/NIGHTLY: 1/' heroku.yml
28
+
29
+ - name : Create and push commit to nightly branch
30
+ run : |
31
+ TIMESTAMP=$(date -u +"%Y-%m-%d %H:%M:%S UTC")
32
+ git checkout -B nightly
33
+ git add heroku.yml
34
+ git commit -m "deploy: $TIMESTAMP"
35
+ git push --force origin nightly
Original file line number Diff line number Diff line change 1
1
FROM python:3.12-slim
2
+ ARG NIGHTLY=0
2
3
3
4
# Install packages needed to run your application (not build deps):
4
5
# We need to recreate the /usr/share/man/man{1..8} directories first because
@@ -34,6 +35,11 @@ RUN set -ex \
34
35
zlib1g-dev \
35
36
" \
36
37
&& apt-get update && apt-get install -y --no-install-recommends $BUILD_DEPS \
38
+ && if [ "$NIGHTLY" = "1" ]; then \
39
+ NIGHTLY_URL=$(curl -s https://releases.wagtail.org/nightly/latest.json | \
40
+ grep -o 'https://[^"]*' ) \
41
+ && sed -i "s|wagtail>=.*|${NIGHTLY_URL}|" /requirements/base.txt; \
42
+ fi \
37
43
&& python3.12 -m venv ${VIRTUAL_ENV} \
38
44
&& python3.12 -m pip install -U pip \
39
45
&& python3.12 -m pip install --no-cache-dir -r /requirements/production.txt \
Original file line number Diff line number Diff line change 2
2
docker :
3
3
web :
4
4
dockerfile : Dockerfile
5
+ config :
6
+ NIGHTLY : 0
5
7
6
8
release :
7
9
image : web
You can’t perform that action at this time.
0 commit comments