9
9
- sycl
10
10
paths :
11
11
- ' devops/containers/**'
12
+ pull_request :
13
+ paths :
14
+ - ' devops/containers/**'
12
15
13
16
jobs :
14
17
base_image_ubuntu2004 :
@@ -20,21 +23,16 @@ jobs:
20
23
uses : actions/checkout@v2
21
24
with :
22
25
fetch-depth : 2
23
- - name : Login to GitHub Container Registry
24
- uses : docker/login-action@v1
26
+ - name : Build and Push Container
27
+ uses : ./devops/actions/build_container
25
28
with :
26
- registry : ghcr.io
29
+ push : ${{ github.event_name != 'pull_request' }}
30
+ file : ubuntu2004_base
27
31
username : ${{ github.repository_owner }}
28
32
password : ${{ secrets.GITHUB_TOKEN }}
29
- - name : Build and Push Container
30
- uses : docker/build-push-action@v2
31
- with :
32
- push : true
33
33
tags : |
34
34
ghcr.io/${{ github.repository }}/ubuntu2004_base:${{ github.sha }}
35
35
ghcr.io/${{ github.repository }}/ubuntu2004_base:latest
36
- context : ${{ github.workspace }}/devops
37
- file : ${{ github.workspace }}/devops/containers/ubuntu2004_base.Dockerfile
38
36
build_image_ubuntu2004 :
39
37
if : github.repository == 'intel/llvm'
40
38
name : Build Ubuntu Docker image
@@ -44,44 +42,36 @@ jobs:
44
42
uses : actions/checkout@v2
45
43
with :
46
44
fetch-depth : 2
47
- - name : Login to GitHub Container Registry
48
- uses : docker/login-action@v1
45
+ - name : Build and Push Container
46
+ uses : ./devops/actions/build_container
49
47
with :
50
- registry : ghcr.io
48
+ push : ${{ github.event_name != 'pull_request' }}
49
+ file : ubuntu2004_build
51
50
username : ${{ github.repository_owner }}
52
51
password : ${{ secrets.GITHUB_TOKEN }}
53
- - name : Build and Push Container
54
- uses : docker/build-push-action@v2
55
- with :
56
- push : true
57
52
tags : |
58
53
ghcr.io/${{ github.repository }}/ubuntu2004_build:${{ github.sha }}
59
54
ghcr.io/${{ github.repository }}/ubuntu2004_build:latest
60
- context : ${{ github.workspace }}/devops
61
- file : ${{ github.workspace }}/devops/containers/ubuntu2004_build.Dockerfile
62
55
# This job produces a Docker container with the latest versions of Intel
63
56
# drivers, that can be found on GitHub.
64
57
drivers_image_ubuntu2004 :
65
58
if : github.repository == 'intel/llvm'
66
59
name : Intel Drivers Ubuntu 20.04 Docker image
67
60
runs-on : ubuntu-latest
61
+ needs : base_image_ubuntu2004
68
62
steps :
69
63
- name : Checkout
70
64
uses : actions/checkout@v2
71
65
with :
72
66
fetch-depth : 2
73
- - name : Login to GitHub Container Registry
74
- uses : docker/login-action@v1
67
+ - name : Build and Push Container
68
+ uses : ./devops/actions/build_container
75
69
with :
76
- registry : ghcr.io
70
+ push : ${{ github.event_name != 'pull_request' }}
71
+ file : ubuntu2004_intel_drivers
77
72
username : ${{ github.repository_owner }}
78
73
password : ${{ secrets.GITHUB_TOKEN }}
79
- - name : Build and Push Container
80
- uses : docker/build-push-action@v2
81
- with :
82
- push : true
83
74
tags : |
84
75
ghcr.io/${{ github.repository }}/ubuntu2004_intel_drivers:latest-${{ github.sha }}
85
76
ghcr.io/${{ github.repository }}/ubuntu2004_intel_drivers:latest
86
- context : ${{ github.workspace }}/devops
87
- file : ${{ github.workspace }}/devops/containers/ubuntu2004_intel_drivers.Dockerfile
77
+
0 commit comments