|
8 | 8 |
|
9 | 9 |
|
10 | 10 | jobs: |
11 | | - build: |
12 | | - name: Build and analyze |
| 11 | + analyze: |
| 12 | + name: Analyze |
13 | 13 | runs-on: ubuntu-latest |
14 | 14 |
|
15 | 15 | steps: |
|
26 | 26 | # timeout-minutes: 5 |
27 | 27 | # env: |
28 | 28 | # SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} |
| 29 | + build-frontend: |
| 30 | + name: Build Frontend Docker Image 🏗️ |
| 31 | + runs-on: ubuntu-latest |
| 32 | + |
| 33 | + steps: |
| 34 | + - name: Check out repository code 🛎️ |
| 35 | + uses: actions/checkout@v4 |
| 36 | + with: |
| 37 | + sparse-checkout: CourseController |
| 38 | + |
| 39 | + - name: Set up QEMU 🐳 |
| 40 | + uses: docker/setup-qemu-action@v2 |
| 41 | + |
| 42 | + - name: Set up Docker Buildx 🚀 |
| 43 | + uses: docker/setup-buildx-action@v3 |
| 44 | + |
| 45 | + - name: Login to Registry 🚢 |
| 46 | + uses: docker/login-action@v3 |
| 47 | + with: |
| 48 | + registry: ghcr.io |
| 49 | + username: ${{ github.actor }} |
| 50 | + password: ${{ secrets.GITHUB_TOKEN }} |
| 51 | + |
| 52 | + - name: Build and push 🏗️ |
| 53 | + uses: docker/build-push-action@v2 |
| 54 | + with: |
| 55 | + context: ./CourseController |
| 56 | + platforms: linux/amd64 |
| 57 | + file: ./CourseController/Dockerfile |
| 58 | + push: true |
| 59 | + tags: ghcr.io/pollak-projects/szf1_13_frontend_coursecontroller/app:latest |
| 60 | + cache-from: type=gha |
| 61 | + cache-to: type=gha,mode=max |
| 62 | + |
| 63 | + build-backend: |
| 64 | + name: Build Backend Docker Image 🏗️ |
| 65 | + runs-on: ubuntu-latest |
| 66 | + |
| 67 | + steps: |
| 68 | + - name: Check out repository code 🛎️ |
| 69 | + uses: actions/checkout@v4 |
| 70 | + with: |
| 71 | + sparse-checkout: server |
| 72 | + |
| 73 | + - name: Set up QEMU 🐳 |
| 74 | + uses: docker/setup-qemu-action@v2 |
| 75 | + |
| 76 | + - name: Set up Docker Buildx 🚀 |
| 77 | + uses: docker/setup-buildx-action@v3 |
| 78 | + |
| 79 | + - name: Login to Registry 🚢 |
| 80 | + uses: docker/login-action@v3 |
| 81 | + with: |
| 82 | + registry: ghcr.io |
| 83 | + username: ${{ github.actor }} |
| 84 | + password: ${{ secrets.GITHUB_TOKEN }} |
| 85 | + |
| 86 | + - name: Build and push 🏗️ |
| 87 | + uses: docker/build-push-action@v2 |
| 88 | + with: |
| 89 | + context: ./server |
| 90 | + platforms: linux/amd64 |
| 91 | + file: ./server/Dockerfile |
| 92 | + push: true |
| 93 | + tags: ghcr.io/pollak-projects/szf1_13_frontend_coursecontroller/api:latest |
| 94 | + cache-from: type=gha |
| 95 | + cache-to: type=gha,mode=max |
| 96 | + |
| 97 | + triggerUpdate: |
| 98 | + name: Trigger Update 🔄 |
| 99 | + runs-on: ubuntu-latest |
| 100 | + needs: [build-backend, build-frontend] |
| 101 | + steps: |
| 102 | + - name: Call Webhook |
| 103 | + uses: distributhor/workflow-webhook@v3 |
| 104 | + with: |
| 105 | + webhook_url: ${{ secrets.WEBHOOK_URL }} |
0 commit comments