Skip to content

Commit d81ea52

Browse files
authored
Merge pull request #18 from RobGeada/FixBuild
CI: Remove prereq image pull, add flags to only generate comments on PRs
2 parents 15aafbe + 9a0683c commit d81ea52

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

.github/workflows/build-and-push.yaml

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -77,15 +77,6 @@ jobs:
7777
echo "IMAGE_NAME=${{ vars.QUAY_RELEASE_REPO }}" >> $GITHUB_ENV
7878
#
7979
# Run docker commands
80-
- name: Pull prerequisite images
81-
run: |
82-
BASE_IMAGES=$(grep -o -P '(?<=FROM ).*' Dockerfile | cut -d ' ' -f1)
83-
84-
if [ -n "$BASE_IMAGES" ]; then
85-
for img in $BASE_IMAGES; do
86-
docker pull "$img"
87-
done
88-
fi
8980
- name: Put expiry date on CI-tagged image
9081
if: env.BUILD_CONTEXT == 'ci'
9182
run: sed -i 's#summary="odh-trustyai-service-python\"#summary="odh-trustyai-service-python" \\ \n quay.expires-after=7d#' Dockerfile
@@ -126,13 +117,15 @@ jobs:
126117
# Leave comment
127118
- uses: peter-evans/find-comment@v3
128119
name: Find Comment
120+
if: env.BUILD_CONTEXT == 'ci'
129121
id: fc
130122
with:
131123
issue-number: ${{ github.event.pull_request.number }}
132124
comment-author: 'github-actions[bot]'
133125
body-includes: PR image build and manifest generation completed successfully
134126
- uses: peter-evans/create-or-update-comment@v4
135127
name: Generate/update success message comment
128+
if: env.BUILD_CONTEXT == 'ci'
136129
with:
137130
comment-id: ${{ steps.fc.outputs.comment-id }}
138131
issue-number: ${{ github.event.pull_request.number }}

0 commit comments

Comments
 (0)