Skip to content

Various changes for Altinkaya workflow #7

Various changes for Altinkaya workflow

Various changes for Altinkaya workflow #7

Workflow file for this run

name: ci
on:
push:
branches:
- master
pull_request:
schedule:
- cron: "0 4 * * *"
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
jobs:
main:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- python_version: "3.11"
codename: jammy
odoo_version: "16.0web"
odoo_org_repo: "altinkaya-opensource/odoo"
image_name: py3.11-odoo-16.0web
services:
postgres:
image: postgres:12
env:
POSTGRES_USER: odoo
POSTGRES_PASSWORD: odoo
POSTGRES_DB: odoo
ports:
- 5432:5432
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to ghcr.io
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build image
uses: docker/build-push-action@v6
with:
build-args: |
codename=${{ matrix.codename }}
python_version=${{ matrix.python_version }}
odoo_version=${{ matrix.odoo_version }}
odoo_org_repo=${{ matrix.odoo_org_repo }}
setuptools_constraint=${{ matrix.setuptools_constraint }}
tags: |
ghcr.io/altinkaya-opensource/altinkaya-ci/${{ matrix.image_name }}:latest
labels: |
org.opencontainers.image.source=${{ github.event.repository.html_url }}
cache-from: type=registry,ref=ghcr.io/altinkaya-opensource/altinkaya-ci/${{ matrix.image_name }}:latest
cache-to: type=local,dest=/tmp/.buildx-cache
load: true
- name: Checkout
uses: actions/checkout@v4
# - name: Tests
# run: docker run -v ${PWD}/tests:/mnt/tests --network=host -e PGHOST=localhost ghcr.io/altinkaya-opensource/altinkaya-ci/${{ matrix.image_name }}:latest /mnt/tests/runtests.sh -v
- name: Push image
uses: docker/build-push-action@v6
with:
context: .
build-args: |
codename=${{ matrix.codename }}
python_version=${{ matrix.python_version }}
odoo_version=${{ matrix.odoo_version }}
odoo_org_repo=${{ matrix.odoo_org_repo }}
setuptools_constraint=${{ matrix.setuptools_constraint }}
tags: |
ghcr.io/altinkaya-opensource/altinkaya-ci/${{ matrix.image_name }}:latest
labels: |
org.opencontainers.image.source=${{ github.event.repository.html_url }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=inline
push: true
if: ${{ github.repository_owner == 'altinkaya-opensource' && github.ref == 'refs/heads/master' }}