File tree 1 file changed +7
-0
lines changed
1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -33,19 +33,26 @@ jobs:
33
33
- name : Check out the repo
34
34
uses : actions/checkout@v3
35
35
36
+ - name : List modified files
37
+ run : echo "FILES_MODIFIED=\"$( git diff --name-only HEAD HEAD^ )\"" >> $GITHUB_ENV
38
+
36
39
- name : Set up QEMU
40
+ if : ${{ contains(env.FILES_MODIFIED, '/Dockerfile') || github.event_name == 'schedule' }}
37
41
uses : docker/setup-qemu-action@v2
38
42
39
43
- name : Set up Docker Buildx
44
+ if : ${{ contains(env.FILES_MODIFIED, '/Dockerfile') || github.event_name == 'schedule' }}
40
45
uses : docker/setup-buildx-action@v2
41
46
42
47
- name : Log in to Docker Hub
48
+ if : ${{ contains(env.FILES_MODIFIED, '/Dockerfile') || github.event_name == 'schedule' }}
43
49
uses : docker/login-action@v2
44
50
with :
45
51
username : nggit
46
52
password : ${{ secrets.DOCKERHUB_TOKEN }}
47
53
48
54
- name : Build and push nggit/${{ matrix.name }}
55
+ if : ${{ contains(env.FILES_MODIFIED, matrix.file) || github.event_name == 'schedule' }}
49
56
uses : docker/build-push-action@v3
50
57
with :
51
58
context : .
You can’t perform that action at this time.
0 commit comments