Skip to content

Commit

Permalink
feat: menambahkan path-filter
Browse files Browse the repository at this point in the history
  • Loading branch information
reacto11mecha committed Jul 20, 2024
1 parent b9f1852 commit 3bbcb55
Showing 1 changed file with 32 additions and 2 deletions.
34 changes: 32 additions & 2 deletions .github/workflows/build-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,38 @@ name: Docker Image Build CI

on:
push:
branches:
- main
# tags:
# - "v*"
# branches:
# - main

jobs:
changes:
runs-on: ubuntu-latest
permissions:
pull-requests: read
outputs:
web: ${{ steps.filter.outputs.web }}
processor: ${{ steps.filter.outputs.processor }}
attendance: ${{ steps.filter.outputs.attendance }}
chooser: ${{ steps.filter.outputs.chooser }}
steps:
# For pull requests it's not necessary to checkout the code
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
web:
- 'apps/web/package.json'
processor:
- 'apps/processor/package.json'
attendance:
- 'apps/client/attendance/package.json
chooser:
- 'apps/client/chooser/package.json
web:
needs: changes
if: github.repository == 'sora-vp/baseline'

runs-on: ubuntu-latest
Expand All @@ -32,6 +59,7 @@ jobs:
tags: ${{ secrets.DOCKERHUB_USERNAME }}/sora-baseline-web:${{ github.ref_name }}

processor:
needs: changes
if: github.repository == 'sora-vp/baseline'

runs-on: ubuntu-latest
Expand All @@ -57,6 +85,7 @@ jobs:
tags: ${{ secrets.DOCKERHUB_USERNAME }}/sora-baseline-processor:${{ github.ref_name }}

client-attendance:
needs: changes
if: github.repository == 'sora-vp/baseline'

runs-on: ubuntu-latest
Expand All @@ -82,6 +111,7 @@ jobs:
tags: ${{ secrets.DOCKERHUB_USERNAME }}/sora-baseline-client-attendance:${{ github.ref_name }}

client-chooser:
needs: changes
if: github.repository == 'sora-vp/baseline'

runs-on: ubuntu-latest
Expand Down

0 comments on commit 3bbcb55

Please sign in to comment.