Run the Materialize Views Django Function #26057
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: Run the Materialize Views Django Function | |
on: | |
schedule: | |
# Run every 4 hours | |
- cron: '*/5 * * * *' | |
workflow_dispatch: | |
inputs: | |
environment: | |
required: true | |
type: choice | |
description: The environment the workflow should run on. | |
options: | |
- dev | |
- staging | |
- preview | |
- production | |
jobs: | |
scheduled-materialize-views: | |
if: ${{ github.event.schedule == '*/5 * * * *' }} | |
strategy: | |
matrix: | |
environments: ["dev", "staging", "production"] | |
name: Run Materialize Views | |
runs-on: ubuntu-latest | |
environment: ${{ matrix.environments }} | |
env: | |
space: ${{ matrix.environments }} | |
steps: | |
- name: Run Command | |
shell: bash | |
id: date | |
run: echo "Testing Matrix" | |
dispatch-materialize-views: | |
if: ${{ github.event.inputs.environment != '' }} | |
name: Run Materialize Views | |
runs-on: ubuntu-latest | |
environment: ${{ inputs.environment }} | |
env: | |
space: ${{ inputs.environment }} | |
steps: | |
- name: Run Command | |
shell: bash | |
id: date | |
run: echo "Testing Matrix" |