Skip to content

Commit 8ddf143

Browse files
[CI] First build Base and Build images, then Intel Drivers
1 parent 66b3b53 commit 8ddf143

File tree

1 file changed

+31
-2
lines changed

1 file changed

+31
-2
lines changed

.github/workflows/sycl-containers.yaml

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ on:
2626
permissions: read-all
2727

2828
jobs:
29-
build_and_push_images:
29+
# First build "Base" and "Build" images
30+
build_and_push_non_intel_images:
3031
if: github.repository == 'intel/llvm'
3132
name: "Containers"
3233
runs-on: ubuntu-latest
@@ -51,6 +52,35 @@ jobs:
5152
file: ubuntu2404_build
5253
tag: latest
5354
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+
# Note: Building these images on PR means using old "Base" and "Build" images,
74+
# as the ones above were not yet pushed.
75+
build_and_push_intel_images:
76+
needs: build_and_push_non_intel_images
77+
name: "Containers"
78+
runs-on: ubuntu-latest
79+
permissions:
80+
packages: write
81+
strategy:
82+
matrix:
83+
include:
5484
- name: Intel Drivers Ubuntu 22.04 Docker image
5585
file: ubuntu2204_intel_drivers
5686
tag: latest
@@ -87,4 +117,3 @@ jobs:
87117
ghcr.io/${{ github.repository }}/${{ matrix.file }}:${{ matrix.tag }}-${{ github.sha }}
88118
ghcr.io/${{ github.repository }}/${{ matrix.file }}:${{ matrix.tag }}
89119
build-args: ${{ matrix.build_args }}
90-

0 commit comments

Comments
 (0)