Skip to content

Commit 2b73723

Browse files
committed
Use "JSON args" for CMD in dockerfiles
Use contains for changed dir check
1 parent 50d62f5 commit 2b73723

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
runs-on: ubuntu-latest
3636
needs:
3737
- changed-dirs
38-
if: startsWith(needs.changed-dirs.outputs.changeDirs, 'operator') || startsWith(needs.changed-dirs.outputs.changeDirs, 'server')
38+
if: contains(needs.changed-dirs.outputs.changeDirs, 'operator') || contains(needs.changed-dirs.outputs.changeDirs, 'server')
3939
strategy:
4040
matrix:
4141
include:
@@ -75,7 +75,7 @@ jobs:
7575

7676
- name: Build and push
7777
uses: docker/build-push-action@v6
78-
if: startsWith(needs.changed-dirs.outputs.changeDirs, matrix.directory)
78+
if: contains(needs.changed-dirs.outputs.changeDirs, matrix.directory)
7979
with:
8080
context: ${{ matrix.directory }}
8181
file: ./${{ matrix.directory }}/Dockerfile

operator/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ COPY requirements.txt requirements.txt
44
RUN pip install -r requirements.txt --no-cache-dir
55

66
COPY operator.py operator.py
7-
CMD kopf run operator.py --verbose
7+
CMD ["kopf", "run", "operator.py", "--verbose"]

server/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ COPY requirements.txt requirements.txt
44
RUN pip install -r requirements.txt --no-cache-dir
55

66
COPY server.py server.py
7-
CMD python server.py
7+
CMD ["python", "server.py"]

0 commit comments

Comments
 (0)