Skip to content

chore: role base implementation #8

chore: role base implementation

chore: role base implementation #8

name: CI plugin-posclient_api
on:
push:
branches:
- main
paths:
- 'backend/plugins/posclient_api/**'
- 'backend/erxes-api-shared/**'
- '.github/workflows/ci-api-posclient.yml'
pull_request:
paths:
- 'backend/plugins/posclient_api/**'
- 'backend/erxes-api-shared/**'
- '.github/workflows/ci-api-posclient.yml'
jobs:
posclient_api-ci:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 8
- name: Set up Node.js
uses: actions/setup-node@v4
- name: Install dependencies
run: pnpm install
- name: Build shared module
run: pnpm nx build erxes-api-shared
- name: Build posclient_api
run: pnpm nx build posclient_api
# Buildx setup
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push Docker image (multi-platform)
if: github.event_name != 'pull_request'
uses: docker/build-push-action@v5
with:
context: .
file: backend/plugins/posclient_api/Dockerfile
push: true
platforms: linux/amd64,linux/arm64
tags: |
erxes/erxes-next-posclient_api:latest
erxes/erxes-next-posclient_api:${{ github.sha }}