Skip to content

Commit

Permalink
Flag doc changes during staging release (#7168)
Browse files Browse the repository at this point in the history
  • Loading branch information
hsubox76 authored Apr 11, 2023
1 parent ea3849f commit 6f05b1a
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion .github/workflows/release-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,14 +132,25 @@ jobs:
-H "Authorization:Bearer $OSS_BOT_GITHUB_TOKEN" \
-d "{\"event_type\":\"staging-tests\", \"client_payload\":{\"versionOrTag\":\"$VERSION_OR_TAG\"}}" \
https://api.github.com/repos/firebase/firebase-js-sdk/dispatches
- name: Check for changes requiring a reference doc publish
id: docs-check
run: git diff --exit-code origin/master HEAD docs-devsite
- name: No diff, docs not needed
if: ${{ success() }}
run: echo "DOCS_NEEDED=false" >> $GITHUB_STATE
- name: Diff returned something, docs are needed
if: ${{ failure() }}
run: echo "DOCS_NEEDED=true" >> $GITHUB_STATE
- name: Log to release tracker
# Sends release information to cloud functions endpoint of release tracker.
if: ${{ always() }}
run: |
DATE=$(date +'%m/%d/%Y')
BASE_VERSION=${{ steps.get-version.outputs.BASE_VERSION }}
STAGING_VERSION=${{ steps.get-version.outputs.STAGING_VERSION }}
OPERATOR=${{ github.actor }}
RELEASE_TRACKER_URL=${{ secrets.RELEASE_TRACKER_URL }}
DOCS_NEEDED=${{ steps.docs-check.outputs.DOCS_NEEDED }}
curl -X POST -H "Content-Type:application/json" \
-d "{\"version\":\"$BASE_VERSION\",\"tag\":\"$STAGING_VERSION\",\"date\":\"$DATE\",\"operator\":\"$OPERATOR\"}" \
-d "{\"version\":\"$BASE_VERSION\",\"tag\":\"$STAGING_VERSION\",\"date\":\"$DATE\",\"operator\":\"$OPERATOR\",\"docs_needed\":\"$DOCS_NEEDED\"}" \
$RELEASE_TRACKER_URL/logStaging

0 comments on commit 6f05b1a

Please sign in to comment.