|
8 | 8 | javaVersion:
|
9 | 9 | gradleInfoLog:
|
10 | 10 | type: boolean
|
| 11 | + pythonVersion: |
11 | 12 | pull_request:
|
12 | 13 | paths:
|
13 | 14 | - firebase-dataconnect/demo/**
|
|
21 | 22 | FDC_JAVA_VERSION: ${{ inputs.javaVersion || '17' }}
|
22 | 23 | FDC_FIREBASE_TOOLS_DIR: ${{ github.workspace }}/firebase-tools
|
23 | 24 | FDC_FIREBASE_COMMAND: ${{ github.workspace }}/firebase-tools/node_modules/.bin/firebase
|
| 25 | + FDC_PYTHON_VERSION: ${{ inputs.pythonVersion || '3.13' }} |
24 | 26 |
|
25 | 27 | defaults:
|
26 | 28 | run:
|
@@ -167,3 +169,69 @@ jobs:
|
167 | 169 | --no-daemon \
|
168 | 170 | ${{ (inputs.gradleInfoLog && '--info') || '' }} \
|
169 | 171 | spotlessCheck
|
| 172 | +
|
| 173 | + send-notifications: |
| 174 | + needs: |
| 175 | + - 'test' |
| 176 | + - 'spotlessCheck' |
| 177 | + if: always() |
| 178 | + permissions: |
| 179 | + issues: write |
| 180 | + runs-on: ubuntu-latest |
| 181 | + steps: |
| 182 | + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 |
| 183 | + with: |
| 184 | + show-progress: false |
| 185 | + sparse-checkout: 'firebase-dataconnect/ci/' |
| 186 | + |
| 187 | + - uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0 |
| 188 | + with: |
| 189 | + python-version: ${{ env.FDC_PYTHON_VERSION }} |
| 190 | + |
| 191 | + - run: pip install -r requirements.txt |
| 192 | + working-directory: firebase-dataconnect/ci |
| 193 | + |
| 194 | + - id: issue-id |
| 195 | + name: Determine GitHub Issue For Commenting |
| 196 | + working-directory: firebase-dataconnect/ci |
| 197 | + env: |
| 198 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 199 | + run: | |
| 200 | + args=( |
| 201 | + python |
| 202 | + calculate_github_issue_for_commenting.py |
| 203 | + --output-file=github_issue_number.txt |
| 204 | + --github-repository='${{ github.repository }}' |
| 205 | + --github-ref='${{ github.ref }}' |
| 206 | + --github-event-name='${{ github.event_name }}' |
| 207 | + --pr-body-github-issue-key=trksmnkncd_notification_issue |
| 208 | + --github-issue-for-scheduled-run=6891 # https://github.com/firebase/firebase-android-sdk/issues/6891 |
| 209 | + ) |
| 210 | + echo "${args[*]}" |
| 211 | + "${args[@]}" |
| 212 | +
|
| 213 | + set -xv |
| 214 | + issue="$(cat github_issue_number.txt)" |
| 215 | + echo "issue=$issue" >> "$GITHUB_OUTPUT" |
| 216 | +
|
| 217 | + - name: Post Comment on GitHub Issue |
| 218 | + if: steps.issue-id.outputs.issue != '' |
| 219 | + working-directory: firebase-dataconnect/ci |
| 220 | + env: |
| 221 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 222 | + run: | |
| 223 | + args=( |
| 224 | + python |
| 225 | + post_comment_for_job_results.py |
| 226 | + --github-issue='${{ steps.issue-id.outputs.issue }}' |
| 227 | + --github-repository='${{ github.repository }}' |
| 228 | + --github-sha='${{ github.sha }}' |
| 229 | + --github-repository-html-url='${{ github.event.repository.html_url }}' |
| 230 | + --github-run-id='${{ github.run_id }}' |
| 231 | + --github-run-number='${{ github.run_number }}' |
| 232 | + --github-run-attempt='${{ github.run_attempt }}' |
| 233 | + 'test:${{ needs.test.result }}' |
| 234 | + 'spotlessCheck:${{ needs.spotlessCheck.result }}' |
| 235 | + ) |
| 236 | + echo "${args[*]}" |
| 237 | + exec "${args[@]}" |
0 commit comments