-
Notifications
You must be signed in to change notification settings - Fork 5
69 lines (66 loc) · 2.46 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# ---------------------------------------------------------------------------
# See the NOTICE file distributed with this work for additional
# information regarding copyright ownership.
#
# This is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as
# published by the Free Software Foundation; either version 2.1 of
# the License, or (at your option) any later version.
#
# This software is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this software; if not, write to the Free
# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301 USA, or see the FSF site: http://www.fsf.org.
# ---------------------------------------------------------------------------
# Build the docker images inside the "build", and "build-node" directories and push them to DockerHub.
# Example taken from https://github.com/marketplace/actions/build-and-push-docker-images
name: build-ci
on:
workflow_dispatch:
# Allows triggering the workflow manually just in case it's needed
push:
branches:
- 'master'
schedule:
# Every Monday at midnight (i.e. once per week). We rebuild it even if there are been no changes to the Dockerfile
# because there can be changes in the versions of softwares installed by apt-get and we want to be as up to date
# as possible.
- cron: '0 0 * * 1'
jobs:
docker:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v4
-
name: Set up QEMU
uses: docker/setup-qemu-action@v3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
-
name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push (build)
uses: docker/build-push-action@v5
with:
context: build
push: true
tags: xwiki/build:latest
-
name: Build and push (build-node)
uses: docker/build-push-action@v5
with:
context: build-node
push: true
tags: xwiki/build-node:latest