Skip to content

Commit 07527c9

Browse files
authored
Add a label forcing a test container rebuild on PRs (#2180) (#2186)
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 41f037a commit 07527c9

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
@@ -55,7 +55,11 @@ jobs:
5555
needs:
5656
- should-build-test-image
5757
if: |
58-
(github.event_name != 'pull_request' || needs.should-build-test-image.outputs.build-image == 'true') &&
58+
(
59+
github.event_name != 'pull_request' ||
60+
needs.should-build-test-image.outputs.build-image == 'true' ||
61+
contains(github.event.pull_request.labels.*.name, 'rebuild-test-container')
62+
) &&
5963
!contains(github.event.pull_request.labels.*.name, 'skip-integration-tests')
6064
6165
outputs:

0 commit comments

Comments
 (0)