File tree 2 files changed +38
-3
lines changed
docker/diffusers-pytorch-cpu
2 files changed +38
-3
lines changed Original file line number Diff line number Diff line change 1
- name : Build Docker images (nightly)
1
+ name : Test, build, and push Docker images
2
2
3
3
on :
4
+ pull_request : # During PRs, we just check if the changes Dockerfiles can be successfully built
5
+ paths :
6
+ - " docker/**"
4
7
workflow_dispatch :
5
8
schedule :
6
9
- cron : " 0 0 * * *" # every day at midnight
14
17
CI_SLACK_CHANNEL : ${{ secrets.CI_DOCKER_CHANNEL }}
15
18
16
19
jobs :
17
- build-docker-images :
20
+ test- build-docker-images :
18
21
runs-on : ubuntu-latest
22
+ if : github.event_name == 'pull_request'
23
+ steps :
24
+ - name : Set up Docker Buildx
25
+ uses : docker/setup-buildx-action@v1
26
+ - name : Check out code
27
+ uses : actions/checkout@v3
28
+ - name : Get changed files
29
+ id : changed-files
30
+ uses : tj-actions/changed-files@3f54ebb830831fc121d3263c1857cfbdc310cdb9 # v42
31
+ with :
32
+ files : docker/**
33
+ - name : Run step if only the files listed above change
34
+ if : steps.changed-files.outputs.only_changed == 'true'
35
+ env :
36
+ CHANGED_FILES : ${{ steps.changed-files.outputs.all_changed_files}}
37
+ run : |
38
+ for file in ${CHANGED_FILES}; do
39
+ echo "$file was changed"
40
+ done
41
+ - name : Build Docker images
42
+ strategy :
43
+ matrix :
44
+ docker-file : ${{ steps.changed-files.outputs.all_changed_files}}
45
+ uses : docker/build-push-action@v4
46
+ with :
47
+ context : ${{ matrix.docker-file }}
48
+ push : False
19
49
50
+ build-and-push-docker-images :
51
+ runs-on : ubuntu-latest
52
+ if : github.event_name != 'pull_request'
53
+
20
54
permissions :
21
55
contents : read
22
56
packages : write
Original file line number Diff line number Diff line change @@ -40,6 +40,7 @@ RUN python3 -m pip install --no-cache-dir --upgrade pip uv==0.1.11 && \
40
40
numpy \
41
41
scipy \
42
42
tensorboard \
43
- transformers
43
+ transformers \
44
+ pandas
44
45
45
46
CMD ["/bin/bash" ]
You can’t perform that action at this time.
0 commit comments