86 lines
2.3 KiB
YAML
86 lines
2.3 KiB
YAML
name: build-and-push
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
- high-performance
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
service:
|
|
- gateway
|
|
- users
|
|
- companies
|
|
- jobs
|
|
- leads
|
|
- job-seekers
|
|
- customers
|
|
- payments
|
|
- employees
|
|
- photographers
|
|
- makeup-artists
|
|
- tutors
|
|
- developers
|
|
- video-editors
|
|
- graphic-designers
|
|
- social-media-managers
|
|
- fitness-trainers
|
|
- catering-services
|
|
- ugc-content-creators
|
|
- cron
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
- name: Login to Registry
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: ${{ secrets.REGISTRY_HOSTPORT }}
|
|
username: ${{ secrets.REGISTRY_USERNAME }}
|
|
password: ${{ secrets.REGISTRY_PASSWORD }}
|
|
|
|
- name: Build and push
|
|
uses: docker/build-push-action@v5
|
|
with:
|
|
context: .
|
|
push: true
|
|
tags: |
|
|
${{ secrets.REGISTRY_HOSTPORT }}/nxtgauge-rust-${{ matrix.service }}:${{ gitea.sha }}
|
|
${{ secrets.REGISTRY_HOSTPORT }}/nxtgauge-rust-${{ matrix.service }}:${{ gitea.ref }}-latest
|
|
file: Dockerfile.simple
|
|
build-args: |
|
|
SERVICE_NAME=${{ matrix.service }}
|
|
|
|
migrate:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
- name: Login to Registry
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: ${{ secrets.REGISTRY_HOSTPORT }}
|
|
username: ${{ secrets.REGISTRY_USERNAME }}
|
|
password: ${{ secrets.REGISTRY_PASSWORD }}
|
|
|
|
- name: Build and push migrate
|
|
uses: docker/build-push-action@v5
|
|
with:
|
|
context: .
|
|
push: true
|
|
tags: |
|
|
${{ secrets.REGISTRY_HOSTPORT }}/nxtgauge-db-migrate:${{ gitea.sha }}
|
|
${{ secrets.REGISTRY_HOSTPORT }}/nxtgauge-db-migrate:${{ gitea.ref }}-latest
|
|
file: Dockerfile.migrate
|