Skip to content

Commit bdf7a96

Browse files
ci(common): use latest images in mergify e2e tests (#1612)
1 parent 338a06c commit bdf7a96

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

.github/workflows/test-suite-orchestrate-e2e-tests.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@ jobs:
5959
- test-suite-docker-build
6060
if: ${{ success() || failure() }}
6161
env:
62-
COMMIT_HASH: ${{ github.event.pull_request.head.sha || github.sha }}
62+
PREVIOUS_COMMIT_HASH: ${{ github.event.pull_request.base.sha }}
63+
NEW_COMMIT_HASH: ${{ github.event.pull_request.head.sha }}
6364
DOCKER_BUILD_RESULTS: ${{ toJSON(needs) }}
6465
runs-on: ubuntu-latest
6566
outputs:
@@ -73,13 +74,15 @@ jobs:
7374
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v0.8.0
7475
with:
7576
script: |
76-
const commitHash = process.env.COMMIT_HASH;
77-
console.log(`Commit hash: ${commitHash}`)
77+
const previousCommitHash = process.env.PREVIOUS_COMMIT_HASH;
78+
const newCommitHash = process.env.NEW_COMMIT_HASH;
79+
console.log(`Previous commit hash: ${previousCommitHash}`)
80+
console.log(`New commit hash: ${newCommitHash}`)
7881
console.log(`Docker build results: ${process.env.DOCKER_BUILD_RESULTS}`)
7982
8083
const dockerBuildResults = JSON.parse(process.env.DOCKER_BUILD_RESULTS);
8184
function getImageTagIfBuilt(key, build_result) {
82-
let imageTag = dockerBuildResults[key].outputs[build_result] === 'success' ? commitHash : '';
85+
let imageTag = dockerBuildResults[key].outputs[build_result] === 'success' ? newCommitHash : previousCommitHash;
8386
console.log(`Assigning image tag '${imageTag}' for ${key}`);
8487
return imageTag;
8588
}

0 commit comments

Comments
 (0)