diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 58311a082..82a6f75d5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,6 +29,8 @@ jobs: - name: Plan jobs to run id: plan run: | + set -xe + jobs="static-analysis,elixir,rust,tauri,kotlin,swift,codeql,build-artifacts,build-perf-artifacts"; # For workflow_dispatch or workflow_call, run all jobs @@ -38,6 +40,13 @@ jobs: exit 0; fi + # For main branch runs, run all jobs + if [ "${{ github.event_name }}" = "push" && "${{ github.ref_name }}" = "main" ]; then + echo "jobs_to_run=$jobs" >> $GITHUB_OUTPUT + + exit 0; + fi + # Fetch base ref for PRs if [ "${{ github.event_name }}" = "pull_request" ]; then git fetch origin ${{ github.base_ref }} --depth=1 @@ -99,9 +108,12 @@ jobs: steps: - uses: actions/checkout@v4 - name: Wait for all jobs to complete + timeout-minutes: 60 env: GH_TOKEN: ${{ github.token }} run: | + set -xe + while true; do jobs_json=$(gh run view ${{ github.run_id }} --json jobs --jq '.jobs | map(select(.name != "required-check"))')