Skip to content

[Rahul] | Add. Workflow Manual Trigger #2

[Rahul] | Add. Workflow Manual Trigger

[Rahul] | Add. Workflow Manual Trigger #2

name: Build and Publish Odoo-16 Demo DB
on:
push:
branches:
- main
- 'release-*'
tags:
- '[0-9]+.[0-9]+.[0-9]+'
workflow_dispatch:
paths:
- ".github/workflows/build_publish_odoo_demoDB.yml"
- "package/resources/database/**"
- "package/docker/demoDB/**"
repository_dispatch:
types: ["bahmni-scripts-trigger"]
jobs:
docker-build-publish:
name: Docker Build & Publish Odoo-16 Demo DB
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set Artifact Version
run: |
wget -q https://raw.githubusercontent.com/Bahmni/bahmni-infra-utils/main/setArtifactVersion.sh && chmod +x setArtifactVersion.sh
./setArtifactVersion.sh
rm setArtifactVersion.sh
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}
- name: Docker Build and Push
id: docker_build
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64,linux/arm64
file: package/docker/demoDB/Dockerfile
push: true
tags: |
bahmni/odoo-16-db:demo-${{env.ARTIFACT_VERSION}}
bahmni/odoo-16-db:demo-latest