Add odoo 18 #230
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
schedule: | |
- cron: "0 4 * * 0" | |
jobs: | |
build-odoo: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
include: | |
- ODOOVERSION: "18.0" | |
PYTHONTAG: py312 | |
PYTHONBIN: python3.12 | |
DISTRO: noble | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Build image | |
uses: docker/build-push-action@v6 | |
with: | |
context: . | |
file: Dockerfile-${{ matrix.ODOOVERSION }} | |
build-args: | | |
PYTHONBIN=${{ matrix.PYTHONBIN }} | |
DISTRO=${{ matrix.DISTRO }} | |
tags: | | |
ghcr.io/${{ github.repository }}:${{ matrix.ODOOVERSION }}-${{ matrix.PYTHONTAG }}-${{ matrix.DISTRO }}-latest | |
cache-from: type=registry,ref=ghcr.io/${{ github.repository }}:${{ matrix.ODOOVERSION }}-${{ matrix.PYTHONTAG }}-${{ matrix.DISTRO }}-latest | |
cache-to: type=local,dest=/tmp/.buildx-cache | |
load: true | |
- run: | | |
docker image ls | |
cd wip | |
docker build -t test . | |
docker compose build | |
if: ${{ matrix.ODOOVERSION == '18.0' }} | |
- name: Install test pre-requisites | |
run: pip install pytest | |
- name: Test | |
env: | |
ODOOVERSION: "${{ matrix.ODOOVERSION }}" | |
PYTHONTAG: "${{ matrix.PYTHONTAG }}" | |
DISTRO: "${{ matrix.DISTRO }}" | |
run: pytest -v tests | |
- name: Login to ghcr.io | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
if: ${{ github.repository_owner == 'acsone' && github.ref == 'refs/heads/master' }} | |
- name: Push image | |
uses: docker/build-push-action@v6 | |
with: | |
context: . | |
file: Dockerfile-${{ matrix.ODOOVERSION }} | |
build-args: | | |
PYTHONBIN=${{ matrix.PYTHONBIN }} | |
DISTRO=${{ matrix.DISTRO }} | |
tags: | | |
ghcr.io/${{ github.repository }}:${{ matrix.ODOOVERSION }}-${{ matrix.PYTHONTAG }}-${{ matrix.DISTRO }}-latest | |
cache-from: type=local,src=/tmp/.buildx-cache | |
cache-to: type=inline | |
push: true | |
if: ${{ github.repository_owner == 'acsone' && github.ref == 'refs/heads/master' }} |