| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- #
- # Copyright (c) 2008-2022 the Urho3D project.
- #
- # Permission is hereby granted, free of charge, to any person obtaining a copy
- # of this software and associated documentation files (the "Software"), to deal
- # in the Software without restriction, including without limitation the rights
- # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- # copies of the Software, and to permit persons to whom the Software is
- # furnished to do so, subject to the following conditions:
- #
- # The above copyright notice and this permission notice shall be included in
- # all copies or substantial portions of the Software.
- #
- # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- # THE SOFTWARE.
- #
- ---
- 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@v2
- 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 ::set-output name=skip::$skip
- 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/[email protected]
- 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:
|