Sure! Pl
This commit is contained in:
87
.github/workflows/docker-build.yml
vendored
Normal file
87
.github/workflows/docker-build.yml
vendored
Normal file
@@ -0,0 +1,87 @@
|
||||
name: Docker Build
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- develop
|
||||
paths:
|
||||
- 'services/auth-service/**'
|
||||
- 'apps/web-*/**'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build-auth-service:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Login to Docker Hub
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
|
||||
- name: Build and push Auth Service
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: ./services/auth-service
|
||||
push: true
|
||||
tags: |
|
||||
goodgo/auth-service:latest
|
||||
goodgo/auth-service:${{ github.sha }}
|
||||
cache-from: type=registry,ref=goodgo/auth-service:buildcache
|
||||
cache-to: type=registry,ref=goodgo/auth-service:buildcache,mode=max
|
||||
|
||||
build-web-admin:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Login to Docker Hub
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
|
||||
- name: Build and push Web Admin
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: ./apps/web-admin
|
||||
push: true
|
||||
tags: |
|
||||
goodgo/web-admin:latest
|
||||
goodgo/web-admin:${{ github.sha }}
|
||||
cache-from: type=registry,ref=goodgo/web-admin:buildcache
|
||||
cache-to: type=registry,ref=goodgo/web-admin:buildcache,mode=max
|
||||
|
||||
build-web-client:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Login to Docker Hub
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
|
||||
- name: Build and push Web Client
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: ./apps/web-client
|
||||
push: true
|
||||
tags: |
|
||||
goodgo/web-client:latest
|
||||
goodgo/web-client:${{ github.sha }}
|
||||
cache-from: type=registry,ref=goodgo/web-client:buildcache
|
||||
cache-to: type=registry,ref=goodgo/web-client:buildcache,mode=max
|
||||
Reference in New Issue
Block a user