Make db_filter regex optional if db_name is not set #248
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: "10.0" | |
PYTHONTAG: py27 | |
PYTHONBIN: python2.7 | |
DISTRO: jammy | |
# /!\ python 3.6 and 3.7 are not supported anymore | |
- ODOOVERSION: "11.0" | |
PYTHONTAG: py36 | |
PYTHONBIN: python3.6 | |
DISTRO: focal | |
- ODOOVERSION: "12.0" | |
PYTHONTAG: py36 | |
PYTHONBIN: python3.6 | |
DISTRO: focal | |
- ODOOVERSION: "12.0" | |
PYTHONTAG: py37 | |
PYTHONBIN: python3.7 | |
DISTRO: focal | |
- ODOOVERSION: "12.0" | |
PYTHONTAG: py39 | |
PYTHONBIN: python3.9 | |
DISTRO: jammy | |
- ODOOVERSION: "13.0" | |
PYTHONTAG: py36 | |
PYTHONBIN: python3.6 | |
DISTRO: focal | |
- ODOOVERSION: "13.0" | |
PYTHONTAG: py37 | |
PYTHONBIN: python3.7 | |
DISTRO: focal | |
- ODOOVERSION: "13.0" | |
PYTHONTAG: py310 | |
PYTHONBIN: python3.10 | |
DISTRO: focal | |
- ODOOVERSION: "14.0" | |
PYTHONTAG: py36 | |
PYTHONBIN: python3.6 | |
DISTRO: focal | |
- ODOOVERSION: "14.0" | |
PYTHONTAG: py37 | |
PYTHONBIN: python3.7 | |
DISTRO: focal | |
- ODOOVERSION: "14.0" | |
PYTHONTAG: py38 | |
PYTHONBIN: python3.8 | |
DISTRO: focal | |
- ODOOVERSION: "14.0" | |
PYTHONTAG: py39 | |
PYTHONBIN: python3.9 | |
DISTRO: focal | |
- ODOOVERSION: "15.0" | |
PYTHONTAG: py38 | |
PYTHONBIN: python3.8 | |
DISTRO: focal | |
- ODOOVERSION: "15.0" | |
PYTHONTAG: py39 | |
PYTHONBIN: python3.9 | |
DISTRO: focal | |
- ODOOVERSION: "15.0" | |
PYTHONTAG: py39 | |
PYTHONBIN: python3.9 | |
DISTRO: jammy | |
- ODOOVERSION: "16.0" | |
PYTHONTAG: py39 | |
PYTHONBIN: python3.9 | |
DISTRO: jammy | |
- ODOOVERSION: "16.0" | |
PYTHONTAG: py310 | |
PYTHONBIN: python3.10 | |
DISTRO: jammy | |
- ODOOVERSION: "16.0" | |
PYTHONTAG: py311 | |
PYTHONBIN: python3.11 | |
DISTRO: jammy | |
- ODOOVERSION: "16.0" | |
PYTHONTAG: py312 | |
PYTHONBIN: python3.12 | |
DISTRO: jammy | |
- ODOOVERSION: "17.0" | |
PYTHONTAG: py310 | |
PYTHONBIN: python3.10 | |
DISTRO: jammy | |
- ODOOVERSION: "17.0" | |
PYTHONTAG: py311 | |
PYTHONBIN: python3.11 | |
DISTRO: jammy | |
- ODOOVERSION: "17.0" | |
PYTHONTAG: py312 | |
PYTHONBIN: python3.12 | |
DISTRO: jammy | |
- 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 | |
- name: Install test pre-requisites | |
run: pip install pytest | |
- name: Test | |
env: | |
ODOOVERSION: "${{ matrix.ODOOVERSION }}" | |
PYTHONTAG: "${{ matrix.PYTHONTAG }}" | |
DISTRO: "${{ matrix.DISTRO }}" | |
BUILDER: "default" | |
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' }} |