Skip to content

Commit 26e15c3

Browse files
authored
Add a label forcing a test container rebuild on PRs (#2180) (#2185)
Usually, the test container only needs rebuilding when a change to the tests or related files happen. However, when creating PRs that target old branches (like when backporting changes to a release branch), the rebuild may not trigger and an older image may be subject to newer tests it is not meant to pass. In order to work around this, a label for triggering rebuilds of the test container manually is added, allowing PRs to rebuild the test container on demand.
1 parent 9879882 commit 26e15c3

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

.github/workflows/integration-test-containers.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,11 @@ jobs:
5656
needs:
5757
- should-build-test-image
5858
if: |
59-
(github.event_name != 'pull_request' || needs.should-build-test-image.outputs.build-image == 'true') &&
59+
(
60+
github.event_name != 'pull_request' ||
61+
needs.should-build-test-image.outputs.build-image == 'true' ||
62+
contains(github.event.pull_request.labels.*.name, 'rebuild-test-container')
63+
) &&
6064
!contains(github.event.pull_request.labels.*.name, 'skip-integration-tests')
6165
6266
outputs:

0 commit comments

Comments
 (0)