Skip to content

Commit

Permalink
Try with CLI again
Browse files Browse the repository at this point in the history
  • Loading branch information
jefchien committed Aug 6, 2024
1 parent 5ef645d commit 6bffb89
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 7 deletions.
6 changes: 1 addition & 5 deletions .github/workflows/build-test-artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
18 changes: 16 additions & 2 deletions .github/workflows/integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}

0 comments on commit 6bffb89

Please sign in to comment.