Skip to content

m164 release

m164 release #26

name: Check Firebase AI Responses
on: pull_request
jobs:
check-version:
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Clone mock responses
run: firebase-ai/update_responses.sh
- name: Find cloned and latest versions
run: |
CLONED=$(git describe --tags)
LATEST=$(git tag --sort=v:refname | tail -n1)
echo "cloned_tag=$CLONED" >> $GITHUB_ENV
echo "latest_tag=$LATEST" >> $GITHUB_ENV
working-directory: firebase-ai/src/test/resources/vertexai-sdk-test-data
- name: Find comment from previous run if exists
uses: peter-evans/find-comment@3eae4d37986fb5a8592848f6a574fdf654e61f9e # v3.1.0
id: fc
with:
issue-number: ${{github.event.number}}
body-includes: Firebase AI Mock Responses Check
- name: Comment on PR if newer version is available
if: ${{env.cloned_tag != env.latest_tag && !steps.fc.outputs.comment-id}}
uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4.0.0
with:
issue-number: ${{github.event.number}}
body: >
### Firebase AI Mock Responses Check :warning:
A newer major version of the mock responses for Firebase AI unit tests is available.
[update_responses.sh](https://github.com/firebase/firebase-android-sdk/blob/main/firebase-ai/update_responses.sh)
should be updated to clone the latest version of the responses: `${{env.latest_tag}}`
- name: Delete comment when version gets updated
if: ${{env.cloned_tag == env.latest_tag && steps.fc.outputs.comment-id}}
uses: detomarco/delete-comment@dd37d1026c669ebfb0ffa5d23890010759ff05d5 # v1.1.0
with:
comment-id: ${{ steps.fc.outputs.comment-id }}