|
61 | 61 | - name: Update formula
|
62 | 62 | if: env.UPDATE_NEEDED == 'true'
|
63 | 63 | run: |
|
64 |
| - TIMESTAMP=$(date +%s) |
65 | 64 | RUN_ID="${{ github.run_id }}-${{ github.run_number }}"
|
66 | 65 | sed -i "1s/^/# Formula last updated on $(date -u +"%Y-%m-%dT%H:%M:%SZ") (Run: ${RUN_ID})\n/" Formula/fpm.rb
|
67 | 66 | sed -i "s|url \".*\"|url \"https://github.com/fortran-lang/fpm/releases/download/${{ env.LATEST_VERSION_V }}/fpm-${{ env.LATEST_VERSION }}.zip\"|" Formula/fpm.rb
|
@@ -95,12 +94,27 @@ jobs:
|
95 | 94 | automated-pr
|
96 | 95 | version-bump
|
97 | 96 |
|
98 |
| - # Wait for test-bot CI to complete (unchanged) |
| 97 | + - name: Trigger brew test-bot |
| 98 | + if: env.UPDATE_NEEDED == 'true' && steps.create-pr.outputs.pull-request-number |
| 99 | + uses: actions/github-script@v7 |
| 100 | + with: |
| 101 | + github-token: ${{ secrets.GITHUB_TOKEN }} |
| 102 | + script: | |
| 103 | + await github.rest.actions.createWorkflowDispatch({ |
| 104 | + owner: context.repo.owner, |
| 105 | + repo: context.repo.repo, |
| 106 | + workflow_id: 'test-bot.yml', # Must match the filename in .github/workflows/ |
| 107 | + ref: 'main', |
| 108 | + inputs: { |
| 109 | + head_sha: '${{ steps.create-pr.outputs.pull-request-head-sha }}' |
| 110 | + } |
| 111 | + }); |
| 112 | +
|
| 113 | + # Wait for test-bot CI to complete |
99 | 114 | - name: Wait for test-bot to complete
|
100 | 115 | if: env.UPDATE_NEEDED == 'true' && steps.create-pr.outputs.pull-request-number
|
101 | 116 | run: |
|
102 | 117 | echo "Waiting for test-bot workflow to complete..."
|
103 |
| - PR_NUMBER=${{ steps.create-pr.outputs.pull-request-number }} |
104 | 118 | timeout=1800 # 30 minutes in seconds
|
105 | 119 | interval=60 # Check every minute
|
106 | 120 | elapsed=0
|
@@ -134,7 +148,7 @@ jobs:
|
134 | 148 |
|
135 | 149 | - name: Add pr-pull label
|
136 | 150 | if: env.UPDATE_NEEDED == 'true' && steps.create-pr.outputs.pull-request-number
|
137 |
| - uses: actions/github-script@v6 |
| 151 | + uses: actions/github-script@v7 |
138 | 152 | with:
|
139 | 153 | github-token: ${{ secrets.GITHUB_TOKEN }}
|
140 | 154 | script: |
|
|
0 commit comments