We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 05c4c0c + 1bd687a commit 15aafbeCopy full SHA for 15aafbe
.github/workflows/build-and-push.yaml
@@ -79,8 +79,13 @@ jobs:
79
# Run docker commands
80
- name: Pull prerequisite images
81
run: |
82
- docker pull $(cat Dockerfile | grep -o -P '(?<=FROM ).*(?= AS build)')
83
- docker pull $(cat Dockerfile | grep -o -P '(?<=FROM ).*(?= AS runtime)')
+ BASE_IMAGES=$(grep -o -P '(?<=FROM ).*' Dockerfile | cut -d ' ' -f1)
+
84
+ if [ -n "$BASE_IMAGES" ]; then
85
+ for img in $BASE_IMAGES; do
86
+ docker pull "$img"
87
+ done
88
+ fi
89
- name: Put expiry date on CI-tagged image
90
if: env.BUILD_CONTEXT == 'ci'
91
run: sed -i 's#summary="odh-trustyai-service-python\"#summary="odh-trustyai-service-python" \\ \n quay.expires-after=7d#' Dockerfile
0 commit comments