Update build cache #4273
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Update build cache | |
# This action checks if there's new proposal data every 12h | |
# If new proposal data is found the cache will be warmed up & a new build will be generated | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} | |
cancel-in-progress: true | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: 0 */3 * * * | |
jobs: | |
cache-refresh: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3.0.2 | |
with: | |
token: ${{ secrets.BOT_TOKEN }} | |
- name: Update cache | |
uses: ./.github/actions/build | |
with: | |
YARN_COMMAND: 'cache:update' | |
- name: check diff | |
run: | | |
if [[ -z $(git status -s) ]] | |
then | |
echo "tree is clean" | |
else | |
git config --global user.name 'Cache bot' | |
git config --global user.email '[email protected]' | |
git commit -am "chore: automated cache update [skip cypress]" | |
git push | |
exit | |
fi |