Skip to content

Commit 71a7f36

Browse files
authored
Test images in main (#1180)
Signed-off-by: Eric Sauer <esauer@redhat.com>
1 parent 8ffbe8f commit 71a7f36

2 files changed

Lines changed: 8 additions & 6 deletions

File tree

.github/workflows/test-images.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ jobs:
4949

5050
create-images:
5151
runs-on: ubuntu-latest
52-
if: ${{ needs.setup.outputs.pr_type != 'closed' }}
5352
needs: setup
5453
steps:
5554
- name: Checkout code
@@ -61,7 +60,7 @@ jobs:
6160
uses: "./.github/workflow_templates/build_push_exporters"
6261
with:
6362
image: rc-pelorus-exporter
64-
tags: vpr${{ needs.setup.outputs.pr_number }}-${{ needs.setup.outputs.commit_hash }}
63+
tags: needs.setup.outputs.commit_hash
6564
quay_imagenamespace: ${{ secrets.QUAY_IMAGE_NAMESPACE }}
6665
quay_username: ${{ secrets.QUAY_USERNAME }}
6766
quay_password: ${{ secrets.QUAY_PASSWORD }}
@@ -75,7 +74,7 @@ jobs:
7574

7675
- name: Use test images in operator
7776
env:
78-
TEST_VERSION: pr${{ needs.setup.outputs.pr_number }}-${{ needs.setup.outputs.commit_hash }}
77+
TEST_VERSION: needs.setup.outputs.commit_hash
7978
working-directory: ./pelorus-operator
8079
run: |
8180
export CURRENT_OPERATOR_VERSION="$(grep "^VERSION ?= " Makefile | cut -c 12-)"
@@ -106,20 +105,21 @@ jobs:
106105
working-directory: ./pelorus-operator
107106
run: |
108107
make podman-build
109-
podman image ls -a | grep pr${{ needs.setup.outputs.pr_number }}-${{ needs.setup.outputs.commit_hash }}
108+
podman image ls -a | grep ${{ needs.setup.outputs.commit_hash }}
110109
podman image ls -a | grep rc-pelorus-operator
111110
make podman-push
112111
113112
- name: Build and push operator bundle test image
114113
working-directory: ./pelorus-operator
115114
run: |
116115
make bundle-build
117-
podman image ls -a | grep pr${{ needs.setup.outputs.pr_number }}-${{ needs.setup.outputs.commit_hash }}
116+
podman image ls -a | grep ${{ needs.setup.outputs.commit_hash }}
118117
podman image ls -a | grep rc-pelorus-operator-bundle
119118
make bundle-push
120119
121120
# TODO delete old comments, just have the last on PR
122121
- name: Comment test command in PR
122+
if: ${{ github.event_name == 'pull_request' }}
123123
uses: "./.github/workflow_templates/comment-pr"
124124
with:
125125
token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/trigger-test-images.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@ name: Trigger test images
22

33
on:
44
push:
5-
branches: [ main ]
5+
branches:
6+
- main
7+
- test-images-**
68
pull_request:
79
branches: [ main ]
810
paths:

0 commit comments

Comments
 (0)