You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
# Copyright 2020 IT Projects Labs
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
name: "DINAR: Docker Image Building"
on:
push:
paths:
- ".DINAR/**"
- ".github/workflows/DINAR.yml"
# Cron works only for defaul branch. See https://github.com/itpp-labs/DINAR/issues/48
schedule:
- cron: "5 5 * * 0"
jobs:
rebuild-images:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v2
with:
path: REPO
- name: Checkout DINAR
uses: actions/checkout@v2
with:
path: DINAR
repository: itpp-labs/DINAR-fork
ref: master
- uses: actions/setup-python@v1
with:
python-version: "3.7.x"
- name: Prepare build folder
run: |
cp -rnT DINAR/embedded-files/ REPO/
- name: Configure Docker
run: |
bash DINAR/workflow-files/configure-docker.sh ${{ secrets.DINAR_TOKEN }}
- name: dinar-odoo-base
uses: elgohr/Publish-Docker-Github-Action@master
env:
LOCAL_CUSTOM_DIR: ./image
AGGREGATE: true
PIP_INSTALL_ODOO: false
CLEAN: false
COMPILE: false
with:
name: ${{ env.IMAGE_ODOO_BASE }}
registry: ${{ env.REGISTRY }}
username: ${{ env.REGISTRY_USERNAME }}
password: ${{ env.REGISTRY_PASSWORD }}
buildargs: ODOO_VERSION,AGGREGATE,PIP_INSTALL_ODOO,CLEAN,COMPILE,LOCAL_CUSTOM_DIR
workdir: REPO/.DINAR/
- name: Install python tools
run: |
pip install plumbum pyyaml
- name: Compute Modules Dependencies
run: |
# sets environment variables that available in next steps via $ {{ env.VAR_NAME }} notation
cd REPO
python ../DINAR/workflow-files/analyze-modules.py all
- name: Install Base Addons
run: |
export MODULES=$ALL_MODULES_DEPENDENCIES
export DOODBA_WITHOUT_DEMO=all
bash DINAR/workflow-files/images-with-preinstalled-modules.sh $IMAGE_DB-nodemo $IMAGE_ODOO-nodemo
export DOODBA_WITHOUT_DEMO=false
bash DINAR/workflow-files/images-with-preinstalled-modules.sh $IMAGE_DB $IMAGE_ODOO
|