Skip to content

Commit

Permalink
Prepare build.sh to regenerate schemas by prefix
Browse files Browse the repository at this point in the history
Prepare build.sh to regenerate schemas by prefix

Prepare build.sh to regenerate schemas by prefix
  • Loading branch information
yannh committed Aug 28, 2021
1 parent b1dca5d commit 129d295
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,28 @@
name: cron
on:
workflow_dispatch:
inputs:
prefix:
description: 'Prefix to regenerate'
required: true
default: 'master'
schedule:
- cron: "10 10 */2 * *"
inputs:
prefix:
description: 'Prefix to regenerate'
required: true
default: 'master'
jobs:
gen:
runs-on: ubuntu-latest
env:
DEFAULT_PREFIX: master
steps:
- name: checkout
uses: actions/checkout@v2

# Ensure master* is up-to-date
- name: delete master folders
run: ls $INPUT_PREFIX*
# Override PREFIX if run manually
- name: Set PREFIX
run: echo "PREFIX=${{ github.event.inputs.prefix || env.DEFAULT_PREFIX }}" >> $GITHUB_ENV

- name: delete folders to regenerate
run: "rm -rf ${{ env.PREFIX }}*"

- name: generate
run: make gen
Expand Down

0 comments on commit 129d295

Please sign in to comment.