| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- # Copyright (c) 2008-2022 the Urho3D project
- # License: MIT
- ---
- name: Nightly
- on:
- workflow_dispatch:
- schedule: [ cron: '0 0 * * *' ]
- jobs:
- nightly:
- name: Nightly build
- runs-on: ubuntu-latest
- env:
- PUBLISHER_NAME: ${{ secrets.PUBLISHER_NAME }}
- PUBLISHER_EMAIL: ${{ secrets.PUBLISHER_EMAIL }}
- PUBLISHER_TOKEN: ${{ secrets.PUBLISHER_TOKEN }}
- steps:
- - name: Checkout
- uses: actions/checkout@v3
- with:
- token: ${{ env.PUBLISHER_TOKEN }}
- - name: Update dot files for DBE
- id: update_dot_files
- run: rake update_dot_files
- - name: Check license
- id: check_license
- run: rake check_license
- - name: Check cache
- id: check_cache
- run: |
- last_run=$(date -d $(curl -H "Accept: application/vnd.github.v3+json" https://api.github.com/repos/urho3d/Urho3D/actions/workflows/2398550/runs 2>/dev/null |jq -r '.workflow_runs[0].created_at') '+%s')
- now=$(date '+%s')
- skip=$(( (now - last_run)/(60*60*24) < 7 ))
- echo "name=skip::$skip" >> $GITHUB_OUTPUT
- if: |
- steps.update_dot_files.outputs.commit == '0' &&
- steps.check_license.outputs.commit == '0'
- - name: Push
- run: git push
- if: |
- steps.update_dot_files.outputs.commit == '1' ||
- steps.check_license.outputs.commit == '1'
- - name: Dispatch
- uses: peter-evans/repository-dispatch@v2
- with:
- token: ${{ env.PUBLISHER_TOKEN }}
- repository: urho3d/Urho3D
- event-type: 'Warm DBE build cache'
- if: steps.check_cache.outputs.skip == '0'
- ...
- # vi: set ts=2 sw=2 expandtab:
|