feat: option to configure index for main CI #55
Workflow file for this run
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: CI | |
on: | |
push: | |
branches: | |
- master | |
- 'stage/**' # branch pattern for general changes | |
pull_request: | |
branches: | |
- master | |
# Enable running this workflow manually from the Actions tab | |
workflow_dispatch: | |
inputs: | |
index: | |
description: "What index to use" | |
type: choice | |
options: | |
# Use the current state of the index repository (i.e., reservoir-index) | |
- current | |
# Update the index repository and then use it | |
- updated | |
# Create and use a small local index artifact (e.g., for testing) | |
- local | |
required: true | |
default: current | |
# GITHUB_TOKEN permissions needed for deployment (copied from pages.yaml) | |
permissions: | |
contents: read | |
deployments: none | |
pull-requests: write | |
statuses: write | |
jobs: | |
index: | |
name: Index | |
if: (inputs.index && inputs.index != 'current') | |
uses: ./.github/workflows/index.yaml | |
with: | |
update-index: ${{ inputs.index == 'updated' }} | |
testbed: | |
needs: index | |
# Run even if `index` is skipped | |
if: (!failure() && !cancelled()) | |
name: Testbed | |
uses: ./.github/workflows/testbed.yaml | |
with: | |
index-artifact: ${{ inputs.index && inputs.index == 'local' || false }} | |
pages: | |
needs: [index, testbed] | |
# Run even if `index` is skipped | |
if: (!failure() && !cancelled()) | |
name: Pages | |
uses: ./.github/workflows/pages.yaml | |
secrets: inherit | |
with: | |
index-artifact: ${{ inputs.index && inputs.index == 'local' || false }} |