mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2026-03-01 12:44:37 +00:00
60 lines
1.7 KiB
YAML
60 lines
1.7 KiB
YAML
name: UI Docker
|
|
|
|
on:
|
|
push:
|
|
branches: [master]
|
|
pull_request:
|
|
branches: [master]
|
|
|
|
jobs:
|
|
files-changed:
|
|
name: Detect File Changes
|
|
runs-on: ubuntu-latest
|
|
outputs:
|
|
ui: ${{ steps.changes.outputs.ui }}
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v6
|
|
|
|
- name: Check for file changes
|
|
uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
|
|
id: changes
|
|
with:
|
|
token: ${{ github.token }}
|
|
filters: .github/file-filters.yml
|
|
|
|
build:
|
|
name: Build Docker Image
|
|
if: needs.files-changed.outputs.ui == 'true'
|
|
needs: files-changed
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v6
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3
|
|
|
|
- name: Build development image
|
|
uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6
|
|
with:
|
|
context: ./packages/ui
|
|
file: ./packages/ui/Dockerfile
|
|
target: development
|
|
push: false
|
|
tags: ocelot-social/ui:development
|
|
cache-from: type=gha,scope=ui-development
|
|
cache-to: type=gha,mode=max,scope=ui-development
|
|
|
|
- name: Build production image
|
|
uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6
|
|
with:
|
|
context: ./packages/ui
|
|
file: ./packages/ui/Dockerfile
|
|
target: production
|
|
push: false
|
|
tags: ocelot-social/ui:latest
|
|
cache-from: type=gha,scope=ui-production
|
|
cache-to: type=gha,mode=max,scope=ui-production
|