Skip to content

Publish demo nightly #117

Publish demo nightly

Publish demo nightly #117

# Run nightly every nights at midnight or when triggered manually
# https://github.com/orgs/community/discussions/27128
name: Publish demo nightly
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * 1,5'
jobs:
check_date:
runs-on: ubuntu-latest
name: Check latest commit
outputs:
should_run: ${{ steps.should_run.outputs.should_run }}
steps:
- uses: actions/checkout@v3
- name: print latest_commit
run: echo ${{ github.sha }}
- id: should_run
continue-on-error: true
name: check latest commit is less than a day
if: ${{ github.event_name == 'schedule' }}
run: test -z $(git rev-list --after="24 hours" ${{ github.sha }}) && echo "::set-output name=should_run::false"
Build-nightly:
needs: check_date
if: ${{ needs.check_date.outputs.should_run != 'false' }}
name: Publish to firebase
uses: ./.github/workflows/publish-demo.yml
with:
isSnapshot: true
secrets:
KEY_PASSWORD: ${{ secrets.DEMO_KEY_PASSWORD }}
FIREBASE_CREDENTIAL_FILE_CONTENT: ${{ secrets.FIREBASE_CREDENTIAL_FILE_CONTENT }}
FIREBASE_GROUP: ${{ secrets.NIGHTLY_GROUPS }}
FIREBASE_APP_ID: ${{ secrets.NIGHTLY_APP_ID }}