From 6bffb89fdc25fd6483ee235c46cc78705563a002 Mon Sep 17 00:00:00 2001 From: Jeffrey Chien Date: Tue, 6 Aug 2024 11:25:01 -0400 Subject: [PATCH] Try with CLI again --- .github/workflows/build-test-artifacts.yml | 6 +----- .github/workflows/integration-test.yml | 18 ++++++++++++++++-- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build-test-artifacts.yml b/.github/workflows/build-test-artifacts.yml index f437eb7a3c..f0b59abbe9 100644 --- a/.github/workflows/build-test-artifacts.yml +++ b/.github/workflows/build-test-artifacts.yml @@ -10,13 +10,9 @@ concurrency: cancel-in-progress: true jobs: - succeed: - runs-on: ubuntu-latest - steps: - - run: echo 'change' dispatch: runs-on: ubuntu-latest steps: - - run: gh workflow run integration-test.yml --ref ${{ github.ref_name }} + - run: gh workflow run integration-test.yml --ref ${{ github.ref_name }} --repo $GITHUB_REPOSITORY -f build_run_id=${{ github.run_id }} env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/integration-test.yml b/.github/workflows/integration-test.yml index 7cf8ee68fd..29f28ade37 100644 --- a/.github/workflows/integration-test.yml +++ b/.github/workflows/integration-test.yml @@ -5,13 +5,27 @@ name: Run Integration Tests on: workflow_dispatch: + inputs: + build_run_id: + description: 'The run ID of the build-test-artifacts workflow' + type: number + required: true concurrency: group: ${{ github.workflow }}-${{ github.ref_name }} cancel-in-progress: true jobs: - succeed: + check_run: runs-on: ubuntu-latest steps: - - run: echo ${{ toJSON(github) }} + - run: | + conclusion=$(gh run view ${{ inputs.build_run_id }} --repo $GITHUB_REPOSITORY --json conclusion -q '.conclusion') + if [[ $conclusion == "success" ]]; then + echo "Run succeeded" + else + echo "Run failed" + exit 1 + fi + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}