Skip to content

Commit fecb44c

Browse files
committed
fixed docker file creator
1 parent eec7676 commit fecb44c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

.github/workflows/build_and_test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,13 +127,13 @@ jobs:
127127
cache-from: type=registry,ref=${{ needs.discover.outputs.image }}:cache-amd64
128128
cache-to: type=registry,ref=${{ needs.discover.outputs.image }}:cache-amd64,mode=max
129129

130-
# NEW: export logs from the logs-export stage to local disk (no docker pull)
130+
# export logs from the logs-export stage to local disk (no docker pull)
131131
- name: Export logs (amd64)
132132
uses: docker/build-push-action@v5
133133
with:
134134
context: .
135135
file: ./Dockerfile.generated
136-
# Build only the tiny logs stage; reuse previous cache so it doesn't rebuild.
136+
# Build only the tiny logs stage; reuse the previous cache so it doesn't rebuild.
137137
target: logs-export
138138
platforms: linux/amd64
139139
push: false

ci/dockerfile_creator.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def available_images() -> str:
2727

2828

2929
def docker_header(image: str) -> str:
30-
commands = f"FROM ghcr.io/gemc/g4install:{image}\n"
30+
commands = f"FROM ghcr.io/gemc/g4install:{image} AS final\n"
3131
commands += f"LABEL maintainer=\"Maurizio Ungaro <ungaro@jlab.org>\"\n\n"
3232
commands += f"# run bash instead of sh\n"
3333
commands += f"SHELL [\"/bin/bash\", \"-c\"]\n\n"
@@ -52,7 +52,7 @@ def install_gemc(tag: str) -> str:
5252
def log_exporters() -> str:
5353
commands = '\n# logs exporter \n'
5454
commands += 'FROM scratch AS logs-export \n'
55-
commands += 'COPY --from=build /root/src/logs /logs \n'
55+
commands += 'COPY --from=final /root/src/logs /logs \n'
5656
return commands
5757

5858
def create_dockerfile(image: str, tag: str) -> str:

0 commit comments

Comments
 (0)