Skip to content

Weekly Build

Weekly Build #204

Workflow file for this run

name: Weekly Build
on:
# once a week build a new image: At 02:30 on Monday.
schedule:
- cron: "30 2 * * 1"
# or manually
workflow_dispatch:
jobs:
# Prebuild: get variables from XOA official repos
pre-build:
runs-on: ubuntu-latest
outputs:
xoserver: ${{ steps.xoa-version.outputs.xoaserver }}
xoweb: ${{ steps.xoa-version.outputs.xoaweb }}
version: ${{ steps.version.outputs.version }}
steps:
-
name: Add python
uses: actions/[email protected]
with:
python-version: '3.10'
-
name: Checkout scripts
uses: actions/[email protected]
-
name: Get XOA server version
id: xoa-version
run: python scripts/xoa_versions.py
-
name: Set global version
id: version
env:
XOASERVER: ${{ steps.xoa-version.outputs.xoaserver }}
run: |
VERSION=$(echo ${XOASERVER} | sed -rn 's/([[:digit:]]+\.[[:digit:]]+)\..*/\1/p')
echo "version=$VERSION" >> $GITHUB_OUTPUT
# build XO in a docker
docker-build:
needs: pre-build
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/[email protected]
-
name: Set up QEMU
uses: docker/[email protected]
-
name: Set up Docker Buildx
uses: docker/[email protected]
-
name: Login to DockerHub
uses: docker/[email protected]
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push
uses: docker/[email protected]
with:
context: alpine
platforms: linux/amd64
push: true
tags: |
ezka77/xen-orchestra-ce:latest
ezka77/xen-orchestra-ce:${{ needs.pre-build.outputs.version }}
build-args: |
VERSION=${{ needs.pre-build.outputs.version }}
XOSERVER=${{ needs.pre-build.outputs.xoserver }}
XOWEB=${{ needs.pre-build.outputs.xoweb }}