diff --git a/.github/workflows/develop.yml b/.github/workflows/develop.yml index 7c740006c50..517aaaac187 100644 --- a/.github/workflows/develop.yml +++ b/.github/workflows/develop.yml @@ -55,7 +55,6 @@ jobs: BENCHER_ADAPTER: json run: | set -euxo pipefail - COMMIT_SHA=$(git log --format="%H" -n 1) docker run --name k-posting-profiling-tests-${GITHUB_SHA} \ --rm -it --detach \ -e BENCHER_API_TOKEN=$BENCHER_API_TOKEN \ @@ -68,7 +67,6 @@ jobs: -e GITHUB_EVENT_NAME=$GITHUB_EVENT_NAME \ -e GITHUB_REPOSITORY=$GITHUB_REPOSITORY \ -e GITHUB_REF=$GITHUB_REF \ - -e GITHUB_SHA=$GITHUB_SHA \ --workdir /opt/workspace \ ${BASE_OS}:${BASE_DISTRO} - name: 'Copy K Framework' @@ -84,7 +82,7 @@ jobs: - name: 'Getting Performance Tests Results' run: | set -euxo pipefail - docker exec -t k-posting-profiling-tests-${GITHUB_SHA} /bin/bash -c 'python3 ./k-distribution/tests/profiling/post_results_to_develop.py' + docker exec -t k-posting-profiling-tests-${GITHUB_SHA} /bin/bash -c './k-distribution/tests/profiling/post_results_to_develop.py $(git log --format="%H" -n 1)' - name: 'Posting Performance Tests Results' run: | set -euxo pipefail diff --git a/k-distribution/tests/profiling/post_results_to_develop.py b/k-distribution/tests/profiling/post_results_to_develop.py index 09b74549e8a..78a24c1f6c4 100755 --- a/k-distribution/tests/profiling/post_results_to_develop.py +++ b/k-distribution/tests/profiling/post_results_to_develop.py @@ -1,7 +1,10 @@ #!/usr/bin/env python3 import json +import sys import subprocess +# Getting commit sha from the first argument +COMMIT_SHA = sys.argv[1] FROM_BRANCH='' TO_BRANCH='develop' @@ -25,7 +28,7 @@ def execute_command(command): # curl command to get the branch name of last commit in develop API_URL = 'https://api.github.com/repos/runtimeverification/k/commits/' \ - + '${COMMIT_SHA}/pulls' + + COMMIT_SHA + '/pulls' branch_command = ['curl', '-L', '-H', 'Accept:', 'application/vnd.github+json', '-H', '\"Authorization', 'Bearer', '${GITHUB_TOKEN}\"', '-H', '\"X-GitHub-Api-Version:', '2022-11-28\"', API_URL]