fix(ci/cd): label based trigger

This commit is contained in:
Harry 2024-01-30 16:31:13 +00:00
parent 69b7278cbb
commit 933305ee78
1 changed files with 5 additions and 3 deletions

View File

@ -9,6 +9,8 @@ jobs:
name: 🏗️ Build Image - Branch
runs-on: ubuntu-latest
if: contains(github.event.pull_request.labels.*.name, '📦 build')
steps:
- name: 🐧 Checkout
uses: actions/checkout@v3
@ -28,19 +30,19 @@ jobs:
password: ${{ secrets.SECRET_DOCKER_01EDU_ORG }}
- name: 🏗️ Build the 💻 Sh Docker image
if: github.event.pull_request.body.contains('[x] Build Sh Docker Image')
if: always()
run: |
docker build sh/tests/ --file sh/tests/Dockerfile --tag ghcr.io/01-edu/test-sh:PR${{ github.event.pull_request.number }}
docker push ghcr.io/01-edu/test-sh:PR${{ github.event.pull_request.number }}
- name: 🏗️ Build the 🚀 JS Docker image
if: github.event.pull_request.body.contains('[x] Build JS Docker Image')
if: always()
run: |
docker build js/tests/ --file js/tests/Dockerfile --tag ghcr.io/01-edu/test-js:PR${{ github.event.pull_request.number }}
docker push ghcr.io/01-edu/test-js:PR${{ github.event.pull_request.number }}
- name: 🏗️ Build the 🧩 DOM Docker image
if: github.event.pull_request.body.contains('[x] Build DOM Docker Image')
if: always()
run: |
docker build . --file dom/Dockerfile --tag ghcr.io/01-edu/test-dom:PR${{ github.event.pull_request.number }}
docker push ghcr.io/01-edu/test-dom:PR${{ github.event.pull_request.number }}