mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2026-02-15 09:12:39 +00:00
Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
60 lines
1.4 KiB
YAML
60 lines
1.4 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@v3
|
|
|
|
- name: Build development image
|
|
uses: docker/build-push-action@v6
|
|
with:
|
|
context: ./packages/ui
|
|
file: ./packages/ui/Dockerfile
|
|
target: development
|
|
push: false
|
|
tags: ocelot-social/ui:development
|
|
cache-from: type=gha
|
|
cache-to: type=gha,mode=max
|
|
|
|
- name: Build production image
|
|
uses: docker/build-push-action@v6
|
|
with:
|
|
context: ./packages/ui
|
|
file: ./packages/ui/Dockerfile
|
|
target: production
|
|
push: false
|
|
tags: ocelot-social/ui:latest
|
|
cache-from: type=gha
|
|
cache-to: type=gha,mode=max
|