From 3bbcb550a8268470944ed55a833310db07aaaa1f Mon Sep 17 00:00:00 2001 From: Ezra Khairan Permana Date: Sat, 20 Jul 2024 15:25:21 +0700 Subject: [PATCH 01/38] feat: menambahkan path-filter --- .github/workflows/build-docker.yml | 34 ++++++++++++++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-docker.yml b/.github/workflows/build-docker.yml index d472c0c..b77cf3d 100644 --- a/.github/workflows/build-docker.yml +++ b/.github/workflows/build-docker.yml @@ -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 @@ -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 @@ -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 @@ -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 From 6063819964aa50b2fdc938fae77d09a31e094201 Mon Sep 17 00:00:00 2001 From: Ezra Khairan Permana Date: Sat, 20 Jul 2024 15:27:21 +0700 Subject: [PATCH 02/38] fix: memperbaiki kurang tanda petik --- .github/workflows/build-docker.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-docker.yml b/.github/workflows/build-docker.yml index b77cf3d..a29bc5f 100644 --- a/.github/workflows/build-docker.yml +++ b/.github/workflows/build-docker.yml @@ -28,9 +28,9 @@ jobs: processor: - 'apps/processor/package.json' attendance: - - 'apps/client/attendance/package.json + - 'apps/client/attendance/package.json' chooser: - - 'apps/client/chooser/package.json + - 'apps/client/chooser/package.json' web: needs: changes From 1b8d57633878ef8264e031349d7efbc89881d491 Mon Sep 17 00:00:00 2001 From: Ezra Khairan Permana Date: Sat, 20 Jul 2024 15:29:33 +0700 Subject: [PATCH 03/38] fix: menambahkan action checkout --- .github/workflows/build-docker.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build-docker.yml b/.github/workflows/build-docker.yml index a29bc5f..d6de7a9 100644 --- a/.github/workflows/build-docker.yml +++ b/.github/workflows/build-docker.yml @@ -18,6 +18,8 @@ jobs: 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 From 194f6a62b5803f48ce6c21d72340a2b91f081224 Mon Sep 17 00:00:00 2001 From: Ezra Khairan Permana Date: Sat, 20 Jul 2024 15:34:27 +0700 Subject: [PATCH 04/38] feat: menambahkan filter untuk mengecek apakah ada update dari masing masing package.json --- .github/workflows/build-docker.yml | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/.github/workflows/build-docker.yml b/.github/workflows/build-docker.yml index d6de7a9..7631b1f 100644 --- a/.github/workflows/build-docker.yml +++ b/.github/workflows/build-docker.yml @@ -8,7 +8,7 @@ on: # - main jobs: - changes: + check-changes: runs-on: ubuntu-latest permissions: pull-requests: read @@ -35,9 +35,8 @@ jobs: - 'apps/client/chooser/package.json' web: - needs: changes - if: github.repository == 'sora-vp/baseline' - + needs: check-changes + if: github.repository == 'sora-vp/baseline' && steps.filter.outputs.web == 'true' runs-on: ubuntu-latest steps: @@ -61,9 +60,8 @@ jobs: tags: ${{ secrets.DOCKERHUB_USERNAME }}/sora-baseline-web:${{ github.ref_name }} processor: - needs: changes - if: github.repository == 'sora-vp/baseline' - + needs: check-changes + if: github.repository == 'sora-vp/baseline' && steps.filter.outputs.processor == 'true' runs-on: ubuntu-latest steps: @@ -87,9 +85,8 @@ jobs: tags: ${{ secrets.DOCKERHUB_USERNAME }}/sora-baseline-processor:${{ github.ref_name }} client-attendance: - needs: changes - if: github.repository == 'sora-vp/baseline' - + needs: check-changes + if: github.repository == 'sora-vp/baseline' && steps.filter.outputs.attendance == 'true' runs-on: ubuntu-latest steps: @@ -113,9 +110,8 @@ jobs: tags: ${{ secrets.DOCKERHUB_USERNAME }}/sora-baseline-client-attendance:${{ github.ref_name }} client-chooser: - needs: changes - if: github.repository == 'sora-vp/baseline' - + needs: check-changes + if: github.repository == 'sora-vp/baseline' && steps.filter.outputs.chooser == 'true' runs-on: ubuntu-latest steps: From 97fdaf6ba31724e231f3b7787fc31ec134d35519 Mon Sep 17 00:00:00 2001 From: Ezra Khairan Permana Date: Sat, 20 Jul 2024 15:40:12 +0700 Subject: [PATCH 05/38] fix: salah implementasi --- .github/workflows/build-docker.yml | 30 +++++++++++++----------------- 1 file changed, 13 insertions(+), 17 deletions(-) diff --git a/.github/workflows/build-docker.yml b/.github/workflows/build-docker.yml index 7631b1f..d14c276 100644 --- a/.github/workflows/build-docker.yml +++ b/.github/workflows/build-docker.yml @@ -8,7 +8,7 @@ on: # - main jobs: - check-changes: + changes: runs-on: ubuntu-latest permissions: pull-requests: read @@ -25,18 +25,14 @@ jobs: 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: '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' + needs: changes + if: github.repository == 'sora-vp/baseline' && needs.changes.outputs.web == 'true' runs-on: ubuntu-latest steps: @@ -60,8 +56,8 @@ jobs: 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' + needs: changes + if: github.repository == 'sora-vp/baseline' && needs.changes.outputs.processor == 'true' runs-on: ubuntu-latest steps: @@ -85,8 +81,8 @@ jobs: 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' + needs: changes + if: github.repository == 'sora-vp/baseline' && needs.changes.outputs.attendance == 'true' runs-on: ubuntu-latest steps: @@ -110,8 +106,8 @@ jobs: 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' + needs: changes + if: github.repository == 'sora-vp/baseline' && needs.changes.outputs.chooser == 'true' runs-on: ubuntu-latest steps: From 220da7285fe61de7401391bf7880218cf64ab541 Mon Sep 17 00:00:00 2001 From: Ezra Khairan Permana Date: Sat, 20 Jul 2024 15:47:59 +0700 Subject: [PATCH 06/38] feat: trigger github action hanya pada saat push tag saja --- .github/workflows/build-docker.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-docker.yml b/.github/workflows/build-docker.yml index d14c276..5c14480 100644 --- a/.github/workflows/build-docker.yml +++ b/.github/workflows/build-docker.yml @@ -2,10 +2,10 @@ name: Docker Image Build CI on: push: - # tags: - # - "v*" - # branches: - # - main + tags: + - "v[0-9]+.[0-9]+.[0-9]+" + branches: + - main jobs: changes: From 66e7b97334aa8062088bba21d3f4c7fc1b21f9a8 Mon Sep 17 00:00:00 2001 From: Ezra Khairan Permana Date: Sat, 20 Jul 2024 16:24:55 +0700 Subject: [PATCH 07/38] feat: menambahkan checkout ke baseline-docker --- .github/workflows/build-docker.yml | 44 ++++++++++++++++++++++-------- 1 file changed, 33 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build-docker.yml b/.github/workflows/build-docker.yml index 5c14480..7f7faf7 100644 --- a/.github/workflows/build-docker.yml +++ b/.github/workflows/build-docker.yml @@ -1,11 +1,11 @@ name: Docker Image Build CI on: - push: - tags: - - "v[0-9]+.[0-9]+.[0-9]+" - branches: - - main + # push: + # tags: + # - "v[0-9]+.[0-9]+.[0-9]+" + # branches: + # - main jobs: changes: @@ -18,9 +18,8 @@ jobs: attendance: ${{ steps.filter.outputs.attendance }} chooser: ${{ steps.filter.outputs.chooser }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - # For pull requests it's not necessary to checkout the code - uses: dorny/paths-filter@v3 id: filter with: @@ -30,13 +29,20 @@ jobs: attendance: 'apps/client/attendance/package.json' chooser: 'apps/client/chooser/package.json' + - uses: actions/checkout@v4 + with: + repository: sora-vp/baseline-docker + + - name: debug + run: ls + web: needs: changes if: github.repository == 'sora-vp/baseline' && needs.changes.outputs.web == 'true' runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 @@ -55,13 +61,17 @@ jobs: push: true tags: ${{ secrets.DOCKERHUB_USERNAME }}/sora-baseline-web:${{ github.ref_name }} + - uses: actions/checkout@v4 + with: + repository: sora-vp/baseline-docker + processor: needs: changes if: github.repository == 'sora-vp/baseline' && needs.changes.outputs.processor == 'true' runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 @@ -80,13 +90,17 @@ jobs: push: true tags: ${{ secrets.DOCKERHUB_USERNAME }}/sora-baseline-processor:${{ github.ref_name }} + - uses: actions/checkout@v4 + with: + repository: sora-vp/baseline-docker + client-attendance: needs: changes if: github.repository == 'sora-vp/baseline' && needs.changes.outputs.attendance == 'true' runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 @@ -105,13 +119,17 @@ jobs: push: true tags: ${{ secrets.DOCKERHUB_USERNAME }}/sora-baseline-client-attendance:${{ github.ref_name }} + - uses: actions/checkout@v4 + with: + repository: sora-vp/baseline-docker + client-chooser: needs: changes if: github.repository == 'sora-vp/baseline' && needs.changes.outputs.chooser == 'true' runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 @@ -129,3 +147,7 @@ jobs: file: "./apps/clients/chooser/Dockerfile" push: true tags: ${{ secrets.DOCKERHUB_USERNAME }}/sora-baseline-client-chooser:${{ github.ref_name }} + + - uses: actions/checkout@v4 + with: + repository: sora-vp/baseline-docker From ec53897d10ff347ec2bc9067307dfdfd4a23faff Mon Sep 17 00:00:00 2001 From: Ezra Khairan Permana Date: Sat, 20 Jul 2024 16:25:25 +0700 Subject: [PATCH 08/38] fix: bablas --- .github/workflows/build-docker.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-docker.yml b/.github/workflows/build-docker.yml index 7f7faf7..9fe6558 100644 --- a/.github/workflows/build-docker.yml +++ b/.github/workflows/build-docker.yml @@ -1,7 +1,7 @@ name: Docker Image Build CI on: - # push: + push: # tags: # - "v[0-9]+.[0-9]+.[0-9]+" # branches: From e10854f6bee2bd8d7477b3daa0e0794dbb73021d Mon Sep 17 00:00:00 2001 From: Ezra Khairan Permana Date: Sat, 20 Jul 2024 16:44:02 +0700 Subject: [PATCH 09/38] feat: pindah ke step sendiri --- .github/workflows/build-docker.yml | 24 +++++------------------- 1 file changed, 5 insertions(+), 19 deletions(-) diff --git a/.github/workflows/build-docker.yml b/.github/workflows/build-docker.yml index 9fe6558..375448e 100644 --- a/.github/workflows/build-docker.yml +++ b/.github/workflows/build-docker.yml @@ -29,13 +29,6 @@ jobs: attendance: 'apps/client/attendance/package.json' chooser: 'apps/client/chooser/package.json' - - uses: actions/checkout@v4 - with: - repository: sora-vp/baseline-docker - - - name: debug - run: ls - web: needs: changes if: github.repository == 'sora-vp/baseline' && needs.changes.outputs.web == 'true' @@ -61,10 +54,6 @@ jobs: push: true tags: ${{ secrets.DOCKERHUB_USERNAME }}/sora-baseline-web:${{ github.ref_name }} - - uses: actions/checkout@v4 - with: - repository: sora-vp/baseline-docker - processor: needs: changes if: github.repository == 'sora-vp/baseline' && needs.changes.outputs.processor == 'true' @@ -90,10 +79,6 @@ jobs: push: true tags: ${{ secrets.DOCKERHUB_USERNAME }}/sora-baseline-processor:${{ github.ref_name }} - - uses: actions/checkout@v4 - with: - repository: sora-vp/baseline-docker - client-attendance: needs: changes if: github.repository == 'sora-vp/baseline' && needs.changes.outputs.attendance == 'true' @@ -119,10 +104,6 @@ jobs: push: true tags: ${{ secrets.DOCKERHUB_USERNAME }}/sora-baseline-client-attendance:${{ github.ref_name }} - - uses: actions/checkout@v4 - with: - repository: sora-vp/baseline-docker - client-chooser: needs: changes if: github.repository == 'sora-vp/baseline' && needs.changes.outputs.chooser == 'true' @@ -148,6 +129,11 @@ jobs: push: true tags: ${{ secrets.DOCKERHUB_USERNAME }}/sora-baseline-client-chooser:${{ github.ref_name }} + update-docker-compose-repo: + needs: [web, processor, client-attendance, client-chooser] + runs-on: ubuntu-latest + + steps: - uses: actions/checkout@v4 with: repository: sora-vp/baseline-docker From 95f989f9b7c7a11a449c0abeebff33ed6815e516 Mon Sep 17 00:00:00 2001 From: Ezra Khairan Permana Date: Sat, 20 Jul 2024 16:45:14 +0700 Subject: [PATCH 10/38] chore: coba update web --- apps/web/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/web/package.json b/apps/web/package.json index 2087c41..4c63560 100644 --- a/apps/web/package.json +++ b/apps/web/package.json @@ -1,6 +1,6 @@ { "name": "@sora-vp/web", - "version": "0.1.0", + "version": "0.1.1", "private": true, "type": "module", "scripts": { From 1732f89fdc1a14eea0bc399e4774606d1a99f374 Mon Sep 17 00:00:00 2001 From: Ezra Khairan Permana Date: Sat, 20 Jul 2024 16:51:22 +0700 Subject: [PATCH 11/38] fix: memperbaiki yang ke skip --- .github/workflows/build-docker.yml | 6 +++++- apps/web/package.json | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-docker.yml b/.github/workflows/build-docker.yml index 375448e..947eadc 100644 --- a/.github/workflows/build-docker.yml +++ b/.github/workflows/build-docker.yml @@ -131,8 +131,12 @@ jobs: update-docker-compose-repo: needs: [web, processor, client-attendance, client-chooser] + if: | + always() + && contains(needs.*.result, 'success') + && !contains(needs.*.result, 'failure') + && (needs.changes.outputs.web == 'true' || needs.changes.outputs.processor == 'true' || needs.changes.outputs.attendance == 'true' || needs.changes.outputs.chooser == 'true') runs-on: ubuntu-latest - steps: - uses: actions/checkout@v4 with: diff --git a/apps/web/package.json b/apps/web/package.json index 4c63560..2087c41 100644 --- a/apps/web/package.json +++ b/apps/web/package.json @@ -1,6 +1,6 @@ { "name": "@sora-vp/web", - "version": "0.1.1", + "version": "0.1.0", "private": true, "type": "module", "scripts": { From b442ac2dedffa151049a1099706f56194ec1d3c7 Mon Sep 17 00:00:00 2001 From: Ezra Khairan Permana Date: Sat, 20 Jul 2024 16:52:48 +0700 Subject: [PATCH 12/38] chore: coba update web --- apps/web/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/web/package.json b/apps/web/package.json index 2087c41..19ad1d0 100644 --- a/apps/web/package.json +++ b/apps/web/package.json @@ -1,6 +1,6 @@ { "name": "@sora-vp/web", - "version": "0.1.0", + "version": "0.1.2", "private": true, "type": "module", "scripts": { From 5f5226b975ce6aaf07ead3fb6c171ca912897f45 Mon Sep 17 00:00:00 2001 From: Ezra Khairan Permana Date: Sun, 21 Jul 2024 07:12:33 +0700 Subject: [PATCH 13/38] feat: menambahkan fungsi rename versi --- .github/workflows/build-docker.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/build-docker.yml b/.github/workflows/build-docker.yml index 947eadc..28d3f41 100644 --- a/.github/workflows/build-docker.yml +++ b/.github/workflows/build-docker.yml @@ -141,3 +141,13 @@ jobs: - uses: actions/checkout@v4 with: repository: sora-vp/baseline-docker + + - name: Rename version + run: | + [ ${{ needs.changes.outputs.web }} == true ] && sed -i 's/rmecha\/sora-baseline-web:[^ ]*/rmecha\/sora-baseline-web:${{ github.ref_name }}/' docker-compose.yml + [ ${{ needs.changes.outputs.processor }} == true ] && sed -i 's/rmecha\/sora-baseline-processor:[^ ]*/rmecha\/sora-baseline-processor:${{ github.ref_name }}/' docker-compose.yml + [ ${{ needs.changes.outputs.attendance }} == true ] && sed -i 's/rmecha\/sora-baseline-client-attendance:[^ ]*/rmecha\/sora-baseline-client-attendance:${{ github.ref_name }}/' docker-compose.yml + [ ${{ needs.changes.outputs.chooser }} == true ] && sed -i 's/rmecha\/sora-baseline-client-chooser:[^ ]*/rmecha\/sora-baseline-client-chooser:${{ github.ref_name }}/' docker-compose.yml + + - name: Inspect output + run: cat docker-compose.yml From 456a4ec48aedd801a367109d194ae14a7385ae46 Mon Sep 17 00:00:00 2001 From: Ezra Khairan Permana Date: Sun, 21 Jul 2024 07:13:20 +0700 Subject: [PATCH 14/38] chore: coba update attendance --- apps/clients/attendance/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/clients/attendance/package.json b/apps/clients/attendance/package.json index 60fb0c7..adcc374 100644 --- a/apps/clients/attendance/package.json +++ b/apps/clients/attendance/package.json @@ -1,7 +1,7 @@ { "name": "@sora-vp/client-attendance", "private": true, - "version": "2.3.1", + "version": "2.3.2", "type": "module", "scripts": { "build": "yarn with-env vite build", From 83a0f7ac7513add4ce3bf360ab922edc99fcc642 Mon Sep 17 00:00:00 2001 From: Ezra Khairan Permana Date: Sun, 21 Jul 2024 07:24:13 +0700 Subject: [PATCH 15/38] feat: pindah ke env --- .github/workflows/build-docker.yml | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build-docker.yml b/.github/workflows/build-docker.yml index 28d3f41..17700fa 100644 --- a/.github/workflows/build-docker.yml +++ b/.github/workflows/build-docker.yml @@ -26,8 +26,8 @@ jobs: filters: | web: 'apps/web/package.json' processor: 'apps/processor/package.json' - attendance: 'apps/client/attendance/package.json' - chooser: 'apps/client/chooser/package.json' + attendance: 'apps/clients/attendance/package.json' + chooser: 'apps/clients/chooser/package.json' web: needs: changes @@ -138,16 +138,22 @@ jobs: && (needs.changes.outputs.web == 'true' || needs.changes.outputs.processor == 'true' || needs.changes.outputs.attendance == 'true' || needs.changes.outputs.chooser == 'true') runs-on: ubuntu-latest steps: + - env: + WEB_UPDATE: ${{ needs.changes.outputs.web }} + PROCESSOR_UPDATE: ${{ needs.changes.outputs.processor }} + ATTENDANCE_UPDATE: ${{ needs.changes.outputs.attendance }} + CHOOSER_UPDATE: ${{ needs.changes.outputs.chooser }} + - uses: actions/checkout@v4 with: repository: sora-vp/baseline-docker - name: Rename version run: | - [ ${{ needs.changes.outputs.web }} == true ] && sed -i 's/rmecha\/sora-baseline-web:[^ ]*/rmecha\/sora-baseline-web:${{ github.ref_name }}/' docker-compose.yml - [ ${{ needs.changes.outputs.processor }} == true ] && sed -i 's/rmecha\/sora-baseline-processor:[^ ]*/rmecha\/sora-baseline-processor:${{ github.ref_name }}/' docker-compose.yml - [ ${{ needs.changes.outputs.attendance }} == true ] && sed -i 's/rmecha\/sora-baseline-client-attendance:[^ ]*/rmecha\/sora-baseline-client-attendance:${{ github.ref_name }}/' docker-compose.yml - [ ${{ needs.changes.outputs.chooser }} == true ] && sed -i 's/rmecha\/sora-baseline-client-chooser:[^ ]*/rmecha\/sora-baseline-client-chooser:${{ github.ref_name }}/' docker-compose.yml + [ $WEB_UPDATE == true ] && sed -i 's/rmecha\/sora-baseline-web:[^ ]*/rmecha\/sora-baseline-web:${{ github.ref_name }}/' docker-compose.yml + [ $PROCESSOR_UPDATE == true ] && sed -i 's/rmecha\/sora-baseline-processor:[^ ]*/rmecha\/sora-baseline-processor:${{ github.ref_name }}/' docker-compose.yml + [ $ATTENDANCE_UPDATE == true ] && sed -i 's/rmecha\/sora-baseline-client-attendance:[^ ]*/rmecha\/sora-baseline-client-attendance:${{ github.ref_name }}/' docker-compose.yml + [ $CHOOSER_UPDATE == true ] && sed -i 's/rmecha\/sora-baseline-client-chooser:[^ ]*/rmecha\/sora-baseline-client-chooser:${{ github.ref_name }}/' docker-compose.yml - name: Inspect output run: cat docker-compose.yml From fca8166490deeeff736576fc774bc2a1c5499000 Mon Sep 17 00:00:00 2001 From: Ezra Khairan Permana Date: Sun, 21 Jul 2024 07:25:22 +0700 Subject: [PATCH 16/38] chore: update lagi --- apps/clients/attendance/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/clients/attendance/package.json b/apps/clients/attendance/package.json index adcc374..f74deb8 100644 --- a/apps/clients/attendance/package.json +++ b/apps/clients/attendance/package.json @@ -1,7 +1,7 @@ { "name": "@sora-vp/client-attendance", "private": true, - "version": "2.3.2", + "version": "2.3.3", "type": "module", "scripts": { "build": "yarn with-env vite build", From 4c0f7eaa368b67096a24241173333e851478005c Mon Sep 17 00:00:00 2001 From: Ezra Khairan Permana Date: Sun, 21 Jul 2024 07:27:10 +0700 Subject: [PATCH 17/38] fix: salah tempat --- .github/workflows/build-docker.yml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build-docker.yml b/.github/workflows/build-docker.yml index 17700fa..8306539 100644 --- a/.github/workflows/build-docker.yml +++ b/.github/workflows/build-docker.yml @@ -138,17 +138,16 @@ jobs: && (needs.changes.outputs.web == 'true' || needs.changes.outputs.processor == 'true' || needs.changes.outputs.attendance == 'true' || needs.changes.outputs.chooser == 'true') runs-on: ubuntu-latest steps: - - env: - WEB_UPDATE: ${{ needs.changes.outputs.web }} - PROCESSOR_UPDATE: ${{ needs.changes.outputs.processor }} - ATTENDANCE_UPDATE: ${{ needs.changes.outputs.attendance }} - CHOOSER_UPDATE: ${{ needs.changes.outputs.chooser }} - - uses: actions/checkout@v4 with: repository: sora-vp/baseline-docker - name: Rename version + env: + WEB_UPDATE: ${{ needs.changes.outputs.web }} + PROCESSOR_UPDATE: ${{ needs.changes.outputs.processor }} + ATTENDANCE_UPDATE: ${{ needs.changes.outputs.attendance }} + CHOOSER_UPDATE: ${{ needs.changes.outputs.chooser }} run: | [ $WEB_UPDATE == true ] && sed -i 's/rmecha\/sora-baseline-web:[^ ]*/rmecha\/sora-baseline-web:${{ github.ref_name }}/' docker-compose.yml [ $PROCESSOR_UPDATE == true ] && sed -i 's/rmecha\/sora-baseline-processor:[^ ]*/rmecha\/sora-baseline-processor:${{ github.ref_name }}/' docker-compose.yml From 2b572d8d4a3f1114ac8201c1ec65b71878dc6e68 Mon Sep 17 00:00:00 2001 From: Ezra Khairan Permana Date: Sun, 21 Jul 2024 07:27:46 +0700 Subject: [PATCH 18/38] fix: lagi lagi update --- apps/clients/attendance/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/clients/attendance/package.json b/apps/clients/attendance/package.json index f74deb8..4d24ddb 100644 --- a/apps/clients/attendance/package.json +++ b/apps/clients/attendance/package.json @@ -1,7 +1,7 @@ { "name": "@sora-vp/client-attendance", "private": true, - "version": "2.3.3", + "version": "2.3.4", "type": "module", "scripts": { "build": "yarn with-env vite build", From e84b4d4f5d4f4dc4a76b3f5391b119cc3c0f9582 Mon Sep 17 00:00:00 2001 From: Ezra Khairan Permana Date: Sun, 21 Jul 2024 07:37:38 +0700 Subject: [PATCH 19/38] chore: rebuild lagi --- .github/workflows/build-docker.yml | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build-docker.yml b/.github/workflows/build-docker.yml index 8306539..bf3884a 100644 --- a/.github/workflows/build-docker.yml +++ b/.github/workflows/build-docker.yml @@ -133,9 +133,8 @@ jobs: needs: [web, processor, client-attendance, client-chooser] if: | always() - && contains(needs.*.result, 'success') + && (contains(needs.web.result, 'success') || contains(needs.processor.result, 'success') || contains(needs.client-attendance.result, 'success') || contains(needs.client-chooser.result, 'success')) && !contains(needs.*.result, 'failure') - && (needs.changes.outputs.web == 'true' || needs.changes.outputs.processor == 'true' || needs.changes.outputs.attendance == 'true' || needs.changes.outputs.chooser == 'true') runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -144,15 +143,15 @@ jobs: - name: Rename version env: - WEB_UPDATE: ${{ needs.changes.outputs.web }} - PROCESSOR_UPDATE: ${{ needs.changes.outputs.processor }} - ATTENDANCE_UPDATE: ${{ needs.changes.outputs.attendance }} - CHOOSER_UPDATE: ${{ needs.changes.outputs.chooser }} + WEB_UPDATE: ${{ needs.web.result }} + PROCESSOR_UPDATE: ${{ needs.processor.result }} + ATTENDANCE_UPDATE: ${{ needs.attendance.result }} + CHOOSER_UPDATE: ${{ needs..chooser.result }} run: | - [ $WEB_UPDATE == true ] && sed -i 's/rmecha\/sora-baseline-web:[^ ]*/rmecha\/sora-baseline-web:${{ github.ref_name }}/' docker-compose.yml - [ $PROCESSOR_UPDATE == true ] && sed -i 's/rmecha\/sora-baseline-processor:[^ ]*/rmecha\/sora-baseline-processor:${{ github.ref_name }}/' docker-compose.yml - [ $ATTENDANCE_UPDATE == true ] && sed -i 's/rmecha\/sora-baseline-client-attendance:[^ ]*/rmecha\/sora-baseline-client-attendance:${{ github.ref_name }}/' docker-compose.yml - [ $CHOOSER_UPDATE == true ] && sed -i 's/rmecha\/sora-baseline-client-chooser:[^ ]*/rmecha\/sora-baseline-client-chooser:${{ github.ref_name }}/' docker-compose.yml + [ $WEB_UPDATE == "success" ] && sed -i 's/rmecha\/sora-baseline-web:[^ ]*/rmecha\/sora-baseline-web:${{ github.ref_name }}/' docker-compose.yml + [ $PROCESSOR_UPDATE == "success" ] && sed -i 's/rmecha\/sora-baseline-processor:[^ ]*/rmecha\/sora-baseline-processor:${{ github.ref_name }}/' docker-compose.yml + [ $ATTENDANCE_UPDATE == "success" ] && sed -i 's/rmecha\/sora-baseline-client-attendance:[^ ]*/rmecha\/sora-baseline-client-attendance:${{ github.ref_name }}/' docker-compose.yml + [ $CHOOSER_UPDATE == "success" ] && sed -i 's/rmecha\/sora-baseline-client-chooser:[^ ]*/rmecha\/sora-baseline-client-chooser:${{ github.ref_name }}/' docker-compose.yml - name: Inspect output - run: cat docker-compose.yml + run: cat docker-compose.yml && git diff From aca39ce79d20b8a67c83913882ee4fad11f36091 Mon Sep 17 00:00:00 2001 From: Ezra Khairan Permana Date: Sun, 21 Jul 2024 07:38:33 +0700 Subject: [PATCH 20/38] chore: coba update processor --- apps/processor/package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/processor/package.json b/apps/processor/package.json index 992200b..2af83cf 100644 --- a/apps/processor/package.json +++ b/apps/processor/package.json @@ -1,5 +1,6 @@ { "name": "@sora-vp/processor", + "version": "2.3.4", "private": true, "type": "module", "main": "dist/index.js", From 4668ad762efea7873a2635bcd33c8b5f86e39c83 Mon Sep 17 00:00:00 2001 From: Ezra Khairan Permana Date: Sun, 21 Jul 2024 07:40:29 +0700 Subject: [PATCH 21/38] fix: kelebihan pulak --- .github/workflows/build-docker.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-docker.yml b/.github/workflows/build-docker.yml index bf3884a..090a2c5 100644 --- a/.github/workflows/build-docker.yml +++ b/.github/workflows/build-docker.yml @@ -146,7 +146,7 @@ jobs: WEB_UPDATE: ${{ needs.web.result }} PROCESSOR_UPDATE: ${{ needs.processor.result }} ATTENDANCE_UPDATE: ${{ needs.attendance.result }} - CHOOSER_UPDATE: ${{ needs..chooser.result }} + CHOOSER_UPDATE: ${{ needs.chooser.result }} run: | [ $WEB_UPDATE == "success" ] && sed -i 's/rmecha\/sora-baseline-web:[^ ]*/rmecha\/sora-baseline-web:${{ github.ref_name }}/' docker-compose.yml [ $PROCESSOR_UPDATE == "success" ] && sed -i 's/rmecha\/sora-baseline-processor:[^ ]*/rmecha\/sora-baseline-processor:${{ github.ref_name }}/' docker-compose.yml From dba67ebd1647450262f250eea6f09368261db9d1 Mon Sep 17 00:00:00 2001 From: Ezra Khairan Permana Date: Sun, 21 Jul 2024 07:40:53 +0700 Subject: [PATCH 22/38] fix: biasaw --- apps/processor/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/processor/package.json b/apps/processor/package.json index 2af83cf..631117b 100644 --- a/apps/processor/package.json +++ b/apps/processor/package.json @@ -1,6 +1,6 @@ { "name": "@sora-vp/processor", - "version": "2.3.4", + "version": "2.3.5", "private": true, "type": "module", "main": "dist/index.js", From 99c4b270a203f367799a736d9ab4722cf4952841 Mon Sep 17 00:00:00 2001 From: Ezra Khairan Permana Date: Sun, 21 Jul 2024 07:45:18 +0700 Subject: [PATCH 23/38] chore: coba up lagi --- .github/workflows/build-docker.yml | 4 ++-- apps/processor/package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-docker.yml b/.github/workflows/build-docker.yml index 090a2c5..086aabb 100644 --- a/.github/workflows/build-docker.yml +++ b/.github/workflows/build-docker.yml @@ -145,8 +145,8 @@ jobs: env: WEB_UPDATE: ${{ needs.web.result }} PROCESSOR_UPDATE: ${{ needs.processor.result }} - ATTENDANCE_UPDATE: ${{ needs.attendance.result }} - CHOOSER_UPDATE: ${{ needs.chooser.result }} + ATTENDANCE_UPDATE: ${{ needs.client-attendance.result }} + CHOOSER_UPDATE: ${{ needs.client-chooser.result }} run: | [ $WEB_UPDATE == "success" ] && sed -i 's/rmecha\/sora-baseline-web:[^ ]*/rmecha\/sora-baseline-web:${{ github.ref_name }}/' docker-compose.yml [ $PROCESSOR_UPDATE == "success" ] && sed -i 's/rmecha\/sora-baseline-processor:[^ ]*/rmecha\/sora-baseline-processor:${{ github.ref_name }}/' docker-compose.yml diff --git a/apps/processor/package.json b/apps/processor/package.json index 631117b..b5e0173 100644 --- a/apps/processor/package.json +++ b/apps/processor/package.json @@ -1,6 +1,6 @@ { "name": "@sora-vp/processor", - "version": "2.3.5", + "version": "2.3.6", "private": true, "type": "module", "main": "dist/index.js", From b360610f6e53ce78dfe6c0ebc0574a988dc58510 Mon Sep 17 00:00:00 2001 From: Ezra Khairan Permana Date: Sun, 21 Jul 2024 07:49:44 +0700 Subject: [PATCH 24/38] fix: jangan lupa titik koma --- .github/workflows/build-docker.yml | 8 ++++---- apps/clients/attendance/package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build-docker.yml b/.github/workflows/build-docker.yml index 086aabb..a0f8043 100644 --- a/.github/workflows/build-docker.yml +++ b/.github/workflows/build-docker.yml @@ -148,10 +148,10 @@ jobs: ATTENDANCE_UPDATE: ${{ needs.client-attendance.result }} CHOOSER_UPDATE: ${{ needs.client-chooser.result }} run: | - [ $WEB_UPDATE == "success" ] && sed -i 's/rmecha\/sora-baseline-web:[^ ]*/rmecha\/sora-baseline-web:${{ github.ref_name }}/' docker-compose.yml - [ $PROCESSOR_UPDATE == "success" ] && sed -i 's/rmecha\/sora-baseline-processor:[^ ]*/rmecha\/sora-baseline-processor:${{ github.ref_name }}/' docker-compose.yml - [ $ATTENDANCE_UPDATE == "success" ] && sed -i 's/rmecha\/sora-baseline-client-attendance:[^ ]*/rmecha\/sora-baseline-client-attendance:${{ github.ref_name }}/' docker-compose.yml - [ $CHOOSER_UPDATE == "success" ] && sed -i 's/rmecha\/sora-baseline-client-chooser:[^ ]*/rmecha\/sora-baseline-client-chooser:${{ github.ref_name }}/' docker-compose.yml + [ $WEB_UPDATE == "success" ] && sed -i 's/rmecha\/sora-baseline-web:[^ ]*/rmecha\/sora-baseline-web:${{ github.ref_name }}/' docker-compose.yml; + [ $PROCESSOR_UPDATE == "success" ] && sed -i 's/rmecha\/sora-baseline-processor:[^ ]*/rmecha\/sora-baseline-processor:${{ github.ref_name }}/' docker-compose.yml; + [ $ATTENDANCE_UPDATE == "success" ] && sed -i 's/rmecha\/sora-baseline-client-attendance:[^ ]*/rmecha\/sora-baseline-client-attendance:${{ github.ref_name }}/' docker-compose.yml; + [ $CHOOSER_UPDATE == "success" ] && sed -i 's/rmecha\/sora-baseline-client-chooser:[^ ]*/rmecha\/sora-baseline-client-chooser:${{ github.ref_name }}/' docker-compose.yml; - name: Inspect output run: cat docker-compose.yml && git diff diff --git a/apps/clients/attendance/package.json b/apps/clients/attendance/package.json index 4d24ddb..f74deb8 100644 --- a/apps/clients/attendance/package.json +++ b/apps/clients/attendance/package.json @@ -1,7 +1,7 @@ { "name": "@sora-vp/client-attendance", "private": true, - "version": "2.3.4", + "version": "2.3.3", "type": "module", "scripts": { "build": "yarn with-env vite build", From 07a4817157255a4af792b70c3ba1d7dff6bdba13 Mon Sep 17 00:00:00 2001 From: Ezra Khairan Permana Date: Sun, 21 Jul 2024 08:01:55 +0700 Subject: [PATCH 25/38] fix: semoga bener --- .github/workflows/build-docker.yml | 24 +++++++++++++++++++----- apps/clients/attendance/package.json | 2 +- 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build-docker.yml b/.github/workflows/build-docker.yml index a0f8043..f75404e 100644 --- a/.github/workflows/build-docker.yml +++ b/.github/workflows/build-docker.yml @@ -147,11 +147,25 @@ jobs: PROCESSOR_UPDATE: ${{ needs.processor.result }} ATTENDANCE_UPDATE: ${{ needs.client-attendance.result }} CHOOSER_UPDATE: ${{ needs.client-chooser.result }} + REF_NAME: ${{ github.ref_name }} run: | - [ $WEB_UPDATE == "success" ] && sed -i 's/rmecha\/sora-baseline-web:[^ ]*/rmecha\/sora-baseline-web:${{ github.ref_name }}/' docker-compose.yml; - [ $PROCESSOR_UPDATE == "success" ] && sed -i 's/rmecha\/sora-baseline-processor:[^ ]*/rmecha\/sora-baseline-processor:${{ github.ref_name }}/' docker-compose.yml; - [ $ATTENDANCE_UPDATE == "success" ] && sed -i 's/rmecha\/sora-baseline-client-attendance:[^ ]*/rmecha\/sora-baseline-client-attendance:${{ github.ref_name }}/' docker-compose.yml; - [ $CHOOSER_UPDATE == "success" ] && sed -i 's/rmecha\/sora-baseline-client-chooser:[^ ]*/rmecha\/sora-baseline-client-chooser:${{ github.ref_name }}/' docker-compose.yml; - + echo "WEB_UPDATE: $WEB_UPDATE" + echo "PROCESSOR_UPDATE: $PROCESSOR_UPDATE" + echo "ATTENDANCE_UPDATE: $ATTENDANCE_UPDATE" + echo "CHOOSER_UPDATE: $CHOOSER_UPDATE" + + if [ "$WEB_UPDATE" == "success" ]; then + sed -i 's/rmecha\/sora-baseline-web:[^ ]*/rmecha\/sora-baseline-web:$REF_NAME/' docker-compose.yml + fi + if [ "$PROCESSOR_UPDATE" == "success" ]; then + sed -i 's/rmecha\/sora-baseline-processor:[^ ]*/rmecha\/sora-baseline-processor:$REF_NAME/' docker-compose.yml + fi + if [ "$ATTENDANCE_UPDATE" == "success" ]; then + sed -i 's/rmecha\/sora-baseline-client-attendance:[^ ]*/rmecha\/sora-baseline-client-attendance:$REF_NAME/' docker-compose.yml + fi + if [ "$CHOOSER_UPDATE" == "success" ]; then + sed -i 's/rmecha\/sora-baseline-client-chooser:[^ ]*/rmecha\/sora-baseline-client-chooser:$REF_NAME/' docker-compose.yml + fi + - name: Inspect output run: cat docker-compose.yml && git diff diff --git a/apps/clients/attendance/package.json b/apps/clients/attendance/package.json index f74deb8..adcc374 100644 --- a/apps/clients/attendance/package.json +++ b/apps/clients/attendance/package.json @@ -1,7 +1,7 @@ { "name": "@sora-vp/client-attendance", "private": true, - "version": "2.3.3", + "version": "2.3.2", "type": "module", "scripts": { "build": "yarn with-env vite build", From 4f83d6fcc75256ecb175055da7ad311cc46e362d Mon Sep 17 00:00:00 2001 From: Ezra Khairan Permana Date: Sun, 21 Jul 2024 08:07:09 +0700 Subject: [PATCH 26/38] fix: dikit lagi --- .github/workflows/build-docker.yml | 9 +++++---- apps/clients/attendance/package.json | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build-docker.yml b/.github/workflows/build-docker.yml index f75404e..c70052e 100644 --- a/.github/workflows/build-docker.yml +++ b/.github/workflows/build-docker.yml @@ -23,6 +23,7 @@ jobs: - uses: dorny/paths-filter@v3 id: filter with: + base: HEAD filters: | web: 'apps/web/package.json' processor: 'apps/processor/package.json' @@ -155,16 +156,16 @@ jobs: echo "CHOOSER_UPDATE: $CHOOSER_UPDATE" if [ "$WEB_UPDATE" == "success" ]; then - sed -i 's/rmecha\/sora-baseline-web:[^ ]*/rmecha\/sora-baseline-web:$REF_NAME/' docker-compose.yml + sed -i 's/rmecha\/sora-baseline-web:[^ ]*/rmecha\/sora-baseline-web:'"$REF_NAME"'/' docker-compose.yml fi if [ "$PROCESSOR_UPDATE" == "success" ]; then - sed -i 's/rmecha\/sora-baseline-processor:[^ ]*/rmecha\/sora-baseline-processor:$REF_NAME/' docker-compose.yml + sed -i 's/rmecha\/sora-baseline-processor:[^ ]*/rmecha\/sora-baseline-processor:'"$REF_NAME"'/' docker-compose.yml fi if [ "$ATTENDANCE_UPDATE" == "success" ]; then - sed -i 's/rmecha\/sora-baseline-client-attendance:[^ ]*/rmecha\/sora-baseline-client-attendance:$REF_NAME/' docker-compose.yml + sed -i 's/rmecha\/sora-baseline-client-attendance:[^ ]*/rmecha\/sora-baseline-client-attendance:'"$REF_NAME"'/' docker-compose.yml fi if [ "$CHOOSER_UPDATE" == "success" ]; then - sed -i 's/rmecha\/sora-baseline-client-chooser:[^ ]*/rmecha\/sora-baseline-client-chooser:$REF_NAME/' docker-compose.yml + sed -i 's/rmecha\/sora-baseline-client-chooser:[^ ]*/rmecha\/sora-baseline-client-chooser:'"$REF_NAME"'/' docker-compose.yml fi - name: Inspect output diff --git a/apps/clients/attendance/package.json b/apps/clients/attendance/package.json index adcc374..60fb0c7 100644 --- a/apps/clients/attendance/package.json +++ b/apps/clients/attendance/package.json @@ -1,7 +1,7 @@ { "name": "@sora-vp/client-attendance", "private": true, - "version": "2.3.2", + "version": "2.3.1", "type": "module", "scripts": { "build": "yarn with-env vite build", From 3a869a9866b4918bc9e7b5175af767c2d29804ee Mon Sep 17 00:00:00 2001 From: Ezra Khairan Permana Date: Sun, 21 Jul 2024 08:08:36 +0700 Subject: [PATCH 27/38] fix: kok ga ada --- apps/clients/attendance/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/clients/attendance/package.json b/apps/clients/attendance/package.json index 60fb0c7..a49188c 100644 --- a/apps/clients/attendance/package.json +++ b/apps/clients/attendance/package.json @@ -1,7 +1,7 @@ { "name": "@sora-vp/client-attendance", "private": true, - "version": "2.3.1", + "version": "2.3.0", "type": "module", "scripts": { "build": "yarn with-env vite build", From 918a0b79a6c8bbc56404edef88f2a3d23cc3e9b8 Mon Sep 17 00:00:00 2001 From: Ezra Khairan Permana Date: Sun, 21 Jul 2024 08:14:31 +0700 Subject: [PATCH 28/38] chore: update (huft) --- apps/web/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/web/package.json b/apps/web/package.json index 19ad1d0..7d7aba0 100644 --- a/apps/web/package.json +++ b/apps/web/package.json @@ -1,6 +1,6 @@ { "name": "@sora-vp/web", - "version": "0.1.2", + "version": "0.1.3", "private": true, "type": "module", "scripts": { From 9246404ee5182339e9c9f1cbf14c02db5f305e83 Mon Sep 17 00:00:00 2001 From: Ezra Khairan Permana Date: Sun, 21 Jul 2024 08:16:15 +0700 Subject: [PATCH 29/38] chore: update lagi (huft**2) --- .github/workflows/build-docker.yml | 1 - apps/processor/package.json | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/build-docker.yml b/.github/workflows/build-docker.yml index c70052e..66b2d28 100644 --- a/.github/workflows/build-docker.yml +++ b/.github/workflows/build-docker.yml @@ -23,7 +23,6 @@ jobs: - uses: dorny/paths-filter@v3 id: filter with: - base: HEAD filters: | web: 'apps/web/package.json' processor: 'apps/processor/package.json' diff --git a/apps/processor/package.json b/apps/processor/package.json index b5e0173..5776ee7 100644 --- a/apps/processor/package.json +++ b/apps/processor/package.json @@ -1,6 +1,6 @@ { "name": "@sora-vp/processor", - "version": "2.3.6", + "version": "2.3.1", "private": true, "type": "module", "main": "dist/index.js", From 9850b845aaf311af459c8a0019ac00aef9dee65f Mon Sep 17 00:00:00 2001 From: Ezra Khairan Permana Date: Sun, 21 Jul 2024 08:54:47 +0700 Subject: [PATCH 30/38] feat: menambahkan fungsionalitas push ke repo docker --- .github/workflows/build-docker.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/.github/workflows/build-docker.yml b/.github/workflows/build-docker.yml index 66b2d28..aa15f1e 100644 --- a/.github/workflows/build-docker.yml +++ b/.github/workflows/build-docker.yml @@ -141,6 +141,11 @@ jobs: with: repository: sora-vp/baseline-docker + - name: Extract branch name + shell: bash + run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT + id: extract_branch + - name: Rename version env: WEB_UPDATE: ${{ needs.web.result }} @@ -169,3 +174,15 @@ jobs: - name: Inspect output run: cat docker-compose.yml && git diff + + - name: Push changes to basic docker compose config repository + uses: cpina/github-action-push-to-another-repository@main + env: + API_TOKEN_GITHUB: ${{ secrets.BASIC_DOCKER_CONFIG_REPO_PAT }} + + with: + destination-github-username: sora-vp + destination-repository-name: baseline-docker + create-target-branch-if-needed: true + user-email: ${{ secrets.MAINTAINER_EMAIL }} + target-branch: ${{ steps.extract_branch.outputs.branch }} From 13c61ecc13d8833942bd919721ce4887da8ad08b Mon Sep 17 00:00:00 2001 From: Ezra Khairan Permana Date: Sun, 21 Jul 2024 09:14:48 +0700 Subject: [PATCH 31/38] fix: ubah pake manual --- .github/workflows/build-docker.yml | 43 +++++++++++++++++------------- 1 file changed, 24 insertions(+), 19 deletions(-) diff --git a/.github/workflows/build-docker.yml b/.github/workflows/build-docker.yml index aa15f1e..681c72e 100644 --- a/.github/workflows/build-docker.yml +++ b/.github/workflows/build-docker.yml @@ -139,12 +139,14 @@ jobs: steps: - uses: actions/checkout@v4 with: + token: ${{ secrets.BASIC_DOCKER_CONFIG_REPO_PAT }} repository: sora-vp/baseline-docker - - name: Extract branch name - shell: bash - run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT - id: extract_branch + - name: setup git config + run: | + git config user.name "GitHub Actions Bot" + git config user.email "<>" + - name: Rename version env: @@ -170,19 +172,22 @@ jobs: fi if [ "$CHOOSER_UPDATE" == "success" ]; then sed -i 's/rmecha\/sora-baseline-client-chooser:[^ ]*/rmecha\/sora-baseline-client-chooser:'"$REF_NAME"'/' docker-compose.yml - fi - - - name: Inspect output - run: cat docker-compose.yml && git diff - - - name: Push changes to basic docker compose config repository - uses: cpina/github-action-push-to-another-repository@main - env: - API_TOKEN_GITHUB: ${{ secrets.BASIC_DOCKER_CONFIG_REPO_PAT }} + fi - with: - destination-github-username: sora-vp - destination-repository-name: baseline-docker - create-target-branch-if-needed: true - user-email: ${{ secrets.MAINTAINER_EMAIL }} - target-branch: ${{ steps.extract_branch.outputs.branch }} + - name: Commit changes + run: git commit -am 'bot-update: update "$REF_NAME" https://github.com/sora-vp/baseline/commit/${{ github.sha }}' + + - name: Debug + run: git log + + # - name: Push changes to basic docker compose config repository + # uses: cpina/github-action-push-to-another-repository@main + # env: + # API_TOKEN_GITHUB: ${{ secrets.BASIC_DOCKER_CONFIG_REPO_PAT }} + # + # with: + # destination-github-username: sora-vp + # destination-repository-name: baseline-docker + # create-target-branch-if-needed: true + # user-email: ${{ secrets.MAINTAINER_EMAIL }} + # target-branch: ${{ steps.extract_branch.outputs.branch }} From 3a2cb84904d77930a1278285979eca1174a7c171 Mon Sep 17 00:00:00 2001 From: Ezra Khairan Permana Date: Sun, 21 Jul 2024 09:17:24 +0700 Subject: [PATCH 32/38] fix --- .github/workflows/build-docker.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-docker.yml b/.github/workflows/build-docker.yml index 681c72e..c933ec3 100644 --- a/.github/workflows/build-docker.yml +++ b/.github/workflows/build-docker.yml @@ -175,7 +175,7 @@ jobs: fi - name: Commit changes - run: git commit -am 'bot-update: update "$REF_NAME" https://github.com/sora-vp/baseline/commit/${{ github.sha }}' + run: git commit -am 'bot-update: update $REF_NAME | https://github.com/sora-vp/baseline/commit/'"${{ github.sha }}"'/' - name: Debug run: git log From 57c4a1fd42e8797e7c390091a337ab03b358ec2b Mon Sep 17 00:00:00 2001 From: Ezra Khairan Permana Date: Sun, 21 Jul 2024 09:18:58 +0700 Subject: [PATCH 33/38] fix --- .github/workflows/build-docker.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-docker.yml b/.github/workflows/build-docker.yml index c933ec3..4061a85 100644 --- a/.github/workflows/build-docker.yml +++ b/.github/workflows/build-docker.yml @@ -175,7 +175,7 @@ jobs: fi - name: Commit changes - run: git commit -am 'bot-update: update $REF_NAME | https://github.com/sora-vp/baseline/commit/'"${{ github.sha }}"'/' + run: git commit -am "bot-update: update ${REF_NAME} | https://github.com/sora-vp/baseline/commit/${{ github.sha }}" - name: Debug run: git log From b9446c6227a16dfd5075c762c21fb0290a12b794 Mon Sep 17 00:00:00 2001 From: Ezra Khairan Permana Date: Sun, 21 Jul 2024 09:21:43 +0700 Subject: [PATCH 34/38] fix --- .github/workflows/build-docker.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-docker.yml b/.github/workflows/build-docker.yml index 4061a85..5672afe 100644 --- a/.github/workflows/build-docker.yml +++ b/.github/workflows/build-docker.yml @@ -175,7 +175,10 @@ jobs: fi - name: Commit changes - run: git commit -am "bot-update: update ${REF_NAME} | https://github.com/sora-vp/baseline/commit/${{ github.sha }}" + env: + REF_NAME: ${{ github.ref_name }} + GITHUB_SHA: ${{ github.sha }} + run: git commit -am "bot-update: update ${REF_NAME}" -m "Cek commit -> https://github.com/sora-vp/baseline/commit/$GITHUB_SHA" - name: Debug run: git log From 3ce81117821134539d0a5dc101ea1f73b02ac52e Mon Sep 17 00:00:00 2001 From: Ezra Khairan Permana Date: Sun, 21 Jul 2024 09:24:32 +0700 Subject: [PATCH 35/38] fix: tanpa kurawal --- .github/workflows/build-docker.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-docker.yml b/.github/workflows/build-docker.yml index 5672afe..deeb623 100644 --- a/.github/workflows/build-docker.yml +++ b/.github/workflows/build-docker.yml @@ -178,7 +178,7 @@ jobs: env: REF_NAME: ${{ github.ref_name }} GITHUB_SHA: ${{ github.sha }} - run: git commit -am "bot-update: update ${REF_NAME}" -m "Cek commit -> https://github.com/sora-vp/baseline/commit/$GITHUB_SHA" + run: git commit -am "bot-update: update $REF_NAME" -m "Cek commit -> https://github.com/sora-vp/baseline/commit/$GITHUB_SHA" - name: Debug run: git log From d271acd1314ab15d8e53e3816486bfdd78064051 Mon Sep 17 00:00:00 2001 From: Ezra Khairan Permana Date: Sun, 21 Jul 2024 09:26:27 +0700 Subject: [PATCH 36/38] fix: pindah jadi newline --- .github/workflows/build-docker.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-docker.yml b/.github/workflows/build-docker.yml index deeb623..3548426 100644 --- a/.github/workflows/build-docker.yml +++ b/.github/workflows/build-docker.yml @@ -178,7 +178,8 @@ jobs: env: REF_NAME: ${{ github.ref_name }} GITHUB_SHA: ${{ github.sha }} - run: git commit -am "bot-update: update $REF_NAME" -m "Cek commit -> https://github.com/sora-vp/baseline/commit/$GITHUB_SHA" + run: | + git commit -am "bot-update: update $REF_NAME" -m "Cek commit -> https://github.com/sora-vp/baseline/commit/$GITHUB_SHA" - name: Debug run: git log From 8254bb8e6f5eb31851f124193f3786d1853fa95c Mon Sep 17 00:00:00 2001 From: Ezra Khairan Permana Date: Sun, 21 Jul 2024 09:35:32 +0700 Subject: [PATCH 37/38] feat: menambahkan fungsi push --- .github/workflows/build-docker.yml | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) diff --git a/.github/workflows/build-docker.yml b/.github/workflows/build-docker.yml index 3548426..d324cfd 100644 --- a/.github/workflows/build-docker.yml +++ b/.github/workflows/build-docker.yml @@ -144,9 +144,8 @@ jobs: - name: setup git config run: | - git config user.name "GitHub Actions Bot" - git config user.email "<>" - + git config --global user.name "github-actions" + git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" - name: Rename version env: @@ -181,17 +180,5 @@ jobs: run: | git commit -am "bot-update: update $REF_NAME" -m "Cek commit -> https://github.com/sora-vp/baseline/commit/$GITHUB_SHA" - - name: Debug - run: git log - - # - name: Push changes to basic docker compose config repository - # uses: cpina/github-action-push-to-another-repository@main - # env: - # API_TOKEN_GITHUB: ${{ secrets.BASIC_DOCKER_CONFIG_REPO_PAT }} - # - # with: - # destination-github-username: sora-vp - # destination-repository-name: baseline-docker - # create-target-branch-if-needed: true - # user-email: ${{ secrets.MAINTAINER_EMAIL }} - # target-branch: ${{ steps.extract_branch.outputs.branch }} + - name: Push 🚀 + run: git push origin main From 0a2cb3ec7febce7b5f69fcbc77f7e128966919de Mon Sep 17 00:00:00 2001 From: Ezra Khairan Permana Date: Sun, 21 Jul 2024 09:40:02 +0700 Subject: [PATCH 38/38] feat: persiapan commit --- .github/workflows/build-docker.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-docker.yml b/.github/workflows/build-docker.yml index d324cfd..b3e5d3f 100644 --- a/.github/workflows/build-docker.yml +++ b/.github/workflows/build-docker.yml @@ -2,10 +2,10 @@ name: Docker Image Build CI on: push: - # tags: - # - "v[0-9]+.[0-9]+.[0-9]+" - # branches: - # - main + tags: + - "v[0-9]+.[0-9]+.[0-9]+" + branches: + - main jobs: changes: @@ -23,6 +23,7 @@ jobs: - uses: dorny/paths-filter@v3 id: filter with: + base: HEAD filters: | web: 'apps/web/package.json' processor: 'apps/processor/package.json'