feat: menambahkan filter untuk mengecek apakah ada update dari masing… #81
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Docker Image Build CI | ||
on: | ||
push: | ||
# tags: | ||
# - "v*" | ||
# branches: | ||
# - main | ||
jobs: | ||
check-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: | ||
- uses: actions/checkout@v3 | ||
# 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: check-changes | ||
if: github.repository == 'sora-vp/baseline' && steps.filter.outputs.web == 'true' | ||
Check failure on line 39 in .github/workflows/build-docker.yml GitHub Actions / Docker Image Build CIInvalid workflow file
|
||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
- name: Login to Docker Hub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- name: Build the Docker image | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
file: "./apps/web/Dockerfile" | ||
push: true | ||
tags: ${{ secrets.DOCKERHUB_USERNAME }}/sora-baseline-web:${{ github.ref_name }} | ||
processor: | ||
needs: check-changes | ||
if: github.repository == 'sora-vp/baseline' && steps.filter.outputs.processor == 'true' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
- name: Login to Docker Hub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- name: Build the Docker image | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
file: "./apps/processor/Dockerfile" | ||
push: true | ||
tags: ${{ secrets.DOCKERHUB_USERNAME }}/sora-baseline-processor:${{ github.ref_name }} | ||
client-attendance: | ||
needs: check-changes | ||
if: github.repository == 'sora-vp/baseline' && steps.filter.outputs.attendance == 'true' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
- name: Login to Docker Hub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- name: Build the Docker image | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
file: "./apps/clients/attendance/Dockerfile" | ||
push: true | ||
tags: ${{ secrets.DOCKERHUB_USERNAME }}/sora-baseline-client-attendance:${{ github.ref_name }} | ||
client-chooser: | ||
needs: check-changes | ||
if: github.repository == 'sora-vp/baseline' && steps.filter.outputs.chooser == 'true' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
- name: Login to Docker Hub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- name: Build the Docker image | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
file: "./apps/clients/chooser/Dockerfile" | ||
push: true | ||
tags: ${{ secrets.DOCKERHUB_USERNAME }}/sora-baseline-client-chooser:${{ github.ref_name }} |