7
7
push :
8
8
branches :
9
9
- sycl
10
+ paths :
11
+ - ' devops/containers/**'
10
12
11
13
jobs :
12
14
base_image_ubuntu2004 :
@@ -18,21 +20,13 @@ jobs:
18
20
uses : actions/checkout@v2
19
21
with :
20
22
fetch-depth : 2
21
- - name : Check if dependencies have changed
22
- id : deps_changed
23
- shell : bash {0}
24
- run : |
25
- git diff --exit-code HEAD~1 -- devops/containers/ubuntu2004_base.Dockerfile
26
- echo "::set-output name=flag::$?"
27
23
- name : Login to GitHub Container Registry
28
- if : ${{ (github.event_name != 'push') || steps.deps_changed.outputs.flag}}
29
24
uses : docker/login-action@v1
30
25
with :
31
26
registry : ghcr.io
32
27
username : ${{ github.repository_owner }}
33
28
password : ${{ secrets.GITHUB_TOKEN }}
34
29
- name : Build and Push Container
35
- if : ${{ (github.event_name != 'push') || steps.deps_changed.outputs.flag}}
36
30
uses : docker/build-push-action@v2
37
31
with :
38
32
push : true
@@ -52,21 +46,13 @@ jobs:
52
46
uses : actions/checkout@v2
53
47
with :
54
48
fetch-depth : 2
55
- - name : Check if dependencies have changed
56
- id : deps_changed
57
- shell : bash {0}
58
- run : |
59
- git diff --exit-code HEAD~1 -- devops/containers/ubuntu2004_intel_drivers.Dockerfile
60
- echo "::set-output name=flag::$?"
61
49
- name : Login to GitHub Container Registry
62
- if : ${{ (github.event_name != 'push') || steps.deps_changed.outputs.flag}}
63
50
uses : docker/login-action@v1
64
51
with :
65
52
registry : ghcr.io
66
53
username : ${{ github.repository_owner }}
67
54
password : ${{ secrets.GITHUB_TOKEN }}
68
55
- name : Build and Push Container
69
- if : ${{ (github.event_name != 'push') || steps.deps_changed.outputs.flag}}
70
56
uses : docker/build-push-action@v2
71
57
with :
72
58
push : true
0 commit comments