Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
45
.gitea/workflows/build-and-push.yaml
Normal file
45
.gitea/workflows/build-and-push.yaml
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
name: Build and Push Docker Images
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ master ]
|
||||||
|
|
||||||
|
env:
|
||||||
|
REGISTRY: git.nullptr.top
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
service: [ gateway, worker ]
|
||||||
|
include:
|
||||||
|
- service: gateway
|
||||||
|
dockerfile: src/LiquidCode.Tester.Gateway/Dockerfile
|
||||||
|
image: git.nullptr.top/liquidcode/liquidcode-tester-gateway
|
||||||
|
- service: worker
|
||||||
|
dockerfile: src/LiquidCode.Tester.Worker/Dockerfile
|
||||||
|
image: git.nullptr.top/liquidcode/liquidcode-tester-worker
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
|
- name: Log in to Container Registry
|
||||||
|
uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
registry: ${{ env.REGISTRY }}
|
||||||
|
username: liquidcode-ci-service
|
||||||
|
password: ${{ secrets.SERVICE_ACCOUNT_TOKEN }}
|
||||||
|
|
||||||
|
- name: Build and Push ${{ matrix.service }} image
|
||||||
|
uses: docker/build-push-action@v6
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
file: ${{ matrix.dockerfile }}
|
||||||
|
push: true
|
||||||
|
tags: ${{ matrix.image }}:latest,${{ matrix.image }}:${{ gitea.sha }}
|
||||||
|
cache-from: type=registry,ref=${{ matrix.image }}:buildcache
|
||||||
|
cache-to: type=registry,ref=${{ matrix.image }}:buildcache,mode=max
|
||||||
Reference in New Issue
Block a user