Skip to content

Commit e4f6d99

Browse files
authored
Only enforce ctf version on merge_group push to develop (#11389)
* Only enforce ctf version on merge_group push to develop * add debug echo to see what was missed * Updated with refernences to merge_group payload instead of pull_request payload * use output and test that we can indeed do this in a fail situation so we can switch it back and know it will work for a true since we already validated that we do get true in the correct place * The test worked, flip back to enforcing only for merge groups to develop
1 parent 99071cd commit e4f6d99

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

.github/workflows/integration-tests.yml

+16
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,23 @@ jobs:
2828
steps:
2929
- name: Checkout the repo
3030
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
31+
- name: Check Merge Group Condition
32+
id: condition-check
33+
run: |
34+
echo "Checking event condition..."
35+
SHOULD_ENFORCE="false"
36+
if [[ "$GITHUB_EVENT_NAME" == "merge_group" ]]; then
37+
echo "We are in a merge_group event, now check if we are on the develop branch"
38+
target_branch=$(cat $GITHUB_EVENT_PATH | jq -r .merge_group.base_ref)
39+
if [[ "$target_branch" == "refs/heads/develop" ]]; then
40+
echo "We are on the develop branch, we should enforce ctf version"
41+
SHOULD_ENFORCE="true"
42+
fi
43+
fi
44+
echo "should we enforce ctf version = $SHOULD_ENFORCE"
45+
echo "should-enforce=$SHOULD_ENFORCE" >> $GITHUB_OUTPUT
3146
- name: Enforce CTF Version
47+
if: steps.condition-check.outputs.should-enforce == 'true'
3248
uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/mod-version@e865e376b8c2d594028c8d645dd6c47169b72974 # v2.2.16
3349
with:
3450
go-project-path: ./integration-tests

0 commit comments

Comments
 (0)