|
26 | 26 | permissions: read-all |
27 | 27 |
|
28 | 28 | jobs: |
29 | | - build_and_push_images: |
| 29 | + # First build "Base" and "Build" images |
| 30 | + build_and_push_non_driver_images: |
30 | 31 | if: github.repository == 'intel/llvm' |
31 | 32 | name: "Containers" |
32 | | - runs-on: ubuntu-latest |
| 33 | + runs-on: [Linux, docker-builder] |
33 | 34 | permissions: |
34 | 35 | packages: write |
35 | 36 | strategy: |
|
51 | 52 | file: ubuntu2404_build |
52 | 53 | tag: latest |
53 | 54 | build_args: "" |
| 55 | + steps: |
| 56 | + - name: Checkout |
| 57 | + uses: actions/checkout@v5 |
| 58 | + with: |
| 59 | + fetch-depth: 2 |
| 60 | + - name: Build and Push Container |
| 61 | + uses: ./devops/actions/build_container |
| 62 | + with: |
| 63 | + push: ${{ github.event_name != 'pull_request' }} |
| 64 | + file: ${{ matrix.file }} |
| 65 | + username: ${{ github.repository_owner }} |
| 66 | + password: ${{ secrets.GITHUB_TOKEN }} |
| 67 | + tags: | |
| 68 | + ghcr.io/${{ github.repository }}/${{ matrix.file }}:${{ matrix.tag }}-${{ github.sha }} |
| 69 | + ghcr.io/${{ github.repository }}/${{ matrix.file }}:${{ matrix.tag }} |
| 70 | + build-args: ${{ matrix.build_args }} |
| 71 | + |
| 72 | + # Then build "Intel Drivers" images that depend on previous images. |
| 73 | + # |
| 74 | + # Note: Building these images on PR means using old "Base" and "Build" images, |
| 75 | + # as the ones above were not yet pushed. |
| 76 | + build_and_push_driver_images: |
| 77 | + needs: build_and_push_non_driver_images |
| 78 | + name: "Containers" |
| 79 | + runs-on: [Linux, docker-builder] |
| 80 | + permissions: |
| 81 | + packages: write |
| 82 | + strategy: |
| 83 | + matrix: |
| 84 | + include: |
54 | 85 | - name: Intel Drivers Ubuntu 22.04 Docker image |
55 | 86 | file: ubuntu2204_intel_drivers |
56 | 87 | tag: latest |
|
87 | 118 | ghcr.io/${{ github.repository }}/${{ matrix.file }}:${{ matrix.tag }}-${{ github.sha }} |
88 | 119 | ghcr.io/${{ github.repository }}/${{ matrix.file }}:${{ matrix.tag }} |
89 | 120 | build-args: ${{ matrix.build_args }} |
90 | | - |
|
0 commit comments