ci: add Gitea Actions workflow
This commit is contained in:
parent
7b11955eca
commit
aed8cf6802
1 changed files with 75 additions and 0 deletions
75
.gitea/workflows/build.yaml
Normal file
75
.gitea/workflows/build.yaml
Normal file
|
|
@ -0,0 +1,75 @@
|
|||
name: build-and-push
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- high-performance
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
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: Build and push
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
tags: |
|
||||
${{ secrets.REGISTRY_HOSTPORT }}/nxtgauge-rust-${{ matrix.service }}:${{ github.sha }}
|
||||
${{ secrets.REGISTRY_HOSTPORT }}/nxtgauge-rust-${{ matrix.service }}:${{ github.ref_name }}-latest
|
||||
file: Dockerfile.simple
|
||||
build-args: |
|
||||
SERVICE_NAME=${{ matrix.service }}
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
insecure: true
|
||||
|
||||
migrate:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Build and push migrate
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
tags: |
|
||||
${{ secrets.REGISTRY_HOSTPORT }}/nxtgauge-db-migrate:${{ github.sha }}
|
||||
${{ secrets.REGISTRY_HOSTPORT }}/nxtgauge-db-migrate:${{ github.ref_name }}-latest
|
||||
file: Dockerfile.migrate
|
||||
insecure: true
|
||||
Loading…
Add table
Reference in a new issue