mirror of https://github.com/odoo/docker.git
feat: adding github action to push image into registry
parent
fc5e9e6c2d
commit
af8544f88f
|
@ -0,0 +1,38 @@
|
||||||
|
name: Build and Push Docker Images
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-and-push:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Log in to GitHub Container Registry
|
||||||
|
uses: docker/login-action@v2
|
||||||
|
with:
|
||||||
|
registry: ghcr.io
|
||||||
|
username: ${{ github.actor }}
|
||||||
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Build and push Docker image for 17.0
|
||||||
|
uses: docker/build-push-action@v4
|
||||||
|
with:
|
||||||
|
context: ./17.0
|
||||||
|
file: ./17.0/Dockerfile
|
||||||
|
push: true
|
||||||
|
tags: ghcr.io/${{ github.repository }}/17.0:latest
|
||||||
|
|
||||||
|
- name: Build and push Docker image for 18.0
|
||||||
|
uses: docker/build-push-action@v4
|
||||||
|
with:
|
||||||
|
context: ./18.0
|
||||||
|
file: ./18.0/Dockerfile
|
||||||
|
push: true
|
||||||
|
tags: ghcr.io/${{ github.repository }}/18.0:latest
|
|
@ -89,7 +89,9 @@ RUN chown odoo /etc/odoo/odoo.conf \
|
||||||
&& mkdir -p /mnt/extra-addons \
|
&& mkdir -p /mnt/extra-addons \
|
||||||
&& chown -R odoo /mnt/extra-addons \
|
&& chown -R odoo /mnt/extra-addons \
|
||||||
&& chmod +x /init-odoo.sh \
|
&& chmod +x /init-odoo.sh \
|
||||||
&& chown -R odoo /init-odoo.sh
|
&& chown -R odoo /init-odoo.sh \
|
||||||
|
&& chmod +x /entrypoint.sh \
|
||||||
|
&& chown -R odoo /entrypoint.sh
|
||||||
|
|
||||||
VOLUME ["/var/lib/odoo", "/mnt/extra-addons"]
|
VOLUME ["/var/lib/odoo", "/mnt/extra-addons"]
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@ services:
|
||||||
- 1234:5432
|
- 1234:5432
|
||||||
odoo:
|
odoo:
|
||||||
build:
|
build:
|
||||||
context: ./17.0
|
context: ./18.0
|
||||||
dockerfile: Dockerfile.custom
|
dockerfile: Dockerfile.custom
|
||||||
environment:
|
environment:
|
||||||
DB_NAME: odoo
|
DB_NAME: odoo
|
||||||
|
|
Loading…
Reference in New Issue