Skip to content

build-ci

build-ci #99

Workflow file for this run

# ---------------------------------------------------------------------------
# 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