also looking at this
fix(setup): let the generated workflow's jobs actually start
#1418
3 files
+224
-3
| @@ -1619,6 +1619,7 @@ jobs: | ||
| 1619 | 1619 | run_review: \${{ steps.determine.outputs.run_review }} |
| 1620 | 1620 | run_fixci: \${{ steps.determine.outputs.run_fixci }} |
| 1621 | 1621 | run_report: \${{ steps.determine.outputs.run_report }} |
| 1622 | run_any: \${{ steps.determine.outputs.run_any }} | |
| 1622 | 1623 | steps: |
| 1623 | 1624 | - name: Determine which jobs to run |
| 1624 | 1625 | id: determine |
| @@ -1641,6 +1642,7 @@ jobs: | ||
| 1641 | 1642 | echo "run_command=false" >> \$GITHUB_OUTPUT |
| 1642 | 1643 | echo "run_review=false" >> \$GITHUB_OUTPUT |
| 1643 | 1644 | echo "run_fixci=false" >> \$GITHUB_OUTPUT |
| 1645 | echo "run_report=false" >> \$GITHUB_OUTPUT | |
| 1644 | 1646 | |
| 1645 | 1647 | if [ "\$" = "pull_request" ] && [ "\$" != "edited" ]; then |
| 1646 | 1648 | # Opened, marked ready, or pushed to — review it. Draft handling and |
| @@ -1723,12 +1725,27 @@ jobs: | ||
| 1723 | 1725 | ${renderScheduleDispatch(plan)} |
| 1724 | 1726 | fi |
| 1725 | 1727 | |
| 1728 | # Every job below needs \`setup\`, and a job whose \`needs\` was skipped | |
| 1729 | # is skipped with it — so \`setup\` has to run whenever anything does. | |
| 1730 | # Derived from what was just written rather than restated, because | |
| 1731 | # restating it is how review, command and fix-ci came to be | |
| 1732 | # unreachable: each was added with its own output and nobody added it | |
| 1733 | # to setup's condition. | |
| 1734 | if grep -q '=true\$' "\$GITHUB_OUTPUT"; then | |
| 1735 | echo "run_any=true" >> \$GITHUB_OUTPUT | |
| 1736 | else | |
| 1737 | echo "run_any=false" >> \$GITHUB_OUTPUT | |
| 1738 | fi | |
| 1739 | ||
| 1726 | 1740 | # Shared setup job for common dependencies |
| 1727 | 1741 | setup: |
| 1728 | 1742 | runs-on: ubuntu-latest |
| 1729 | 1743 | timeout-minutes: 10 |
| 1730 | 1744 | needs: determine-jobs |
| 1731 | if: \${{ needs.determine-jobs.outputs.run_check == 'true' || needs.determine-jobs.outputs.run_update == 'true' || needs.determine-jobs.outputs.run_dashboard == 'true' || needs.determine-jobs.outputs.run_report == 'true' }} | |
| 1745 | # \`gate\`, \`touch\`, \`post-merge\` and \`issue-links\` gate on \`github.event_name\` | |
| 1746 | # rather than on an output, so those two events are named here instead of | |
| 1747 | # having their conditions restated a second time and left to drift. | |
| 1748 | if: \${{ needs.determine-jobs.outputs.run_any == 'true' || github.event_name == 'pull_request' || github.event_name == 'issues' }} | |
| 1732 | 1749 | steps: |
| 1733 | 1750 | - name: Checkout repository |
| 1734 | 1751 | uses: actions/checkout@v4 |