From 2ac8ead02c2f268d8ee809896e488bfa4eb7124e Mon Sep 17 00:00:00 2001 From: Alexey Matvievsky <72048991+matvievsky@users.noreply.github.com> Date: Wed, 21 Sep 2022 11:08:15 +0400 Subject: [PATCH] Integration tests workflow quick fix 3 (#4033) * Integration tests fix #2 * Now on event GHA job should look at the pull request branch * fix Co-authored-by: Alexey Matvievsky --- .github/workflows/consumer-tests-pr.yml | 14 ++++++++++++++ .github/workflows/integration-tests-pr.yml | 14 ++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/.github/workflows/consumer-tests-pr.yml b/.github/workflows/consumer-tests-pr.yml index 6f9b8f6c5..bbec90c7f 100644 --- a/.github/workflows/consumer-tests-pr.yml +++ b/.github/workflows/consumer-tests-pr.yml @@ -20,7 +20,21 @@ jobs: ) runs-on: ubuntu-latest steps: + - name: Get pull request URL + id: pull_request + run: | + echo "::set-output name=pull_request::$(curl ${{ github.event.comment.issue_url }} | + jq '.pull_request.url' | + sed 's/\"//g')" + - name: Get branch name + id: branch_name + run: | + echo "::set-output name=branch_name::$(curl ${{ steps.pull_request.outputs.pull_request }} | + jq '.head.ref' | + sed 's/\"//g')" - uses: actions/checkout@v3 + with: + ref: ${{ steps.branch_name.outputs.branch_name }} - uses: actions/setup-java@v1 with: java-version: 11 diff --git a/.github/workflows/integration-tests-pr.yml b/.github/workflows/integration-tests-pr.yml index 1955898ed..13dfae7ff 100644 --- a/.github/workflows/integration-tests-pr.yml +++ b/.github/workflows/integration-tests-pr.yml @@ -29,7 +29,21 @@ jobs: sha: ${{ steps.sha.outputs.sha }} runs-on: ubuntu-latest steps: + - name: Get pull request URL + id: pull_request + run: | + echo "::set-output name=pull_request::$(curl ${{ github.event.comment.issue_url }} | + jq '.pull_request.url' | + sed 's/\"//g')" + - name: Get branch name + id: branch_name + run: | + echo "::set-output name=branch_name::$(curl ${{ steps.pull_request.outputs.pull_request }} | + jq '.head.ref' | + sed 's/\"//g')" - uses: actions/checkout@v3 + with: + ref: ${{ steps.branch_name.outputs.branch_name }} - name: Get commit SHA id: sha run: |