Add CORS support to webapp (#43) #217
This file contains hidden or 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: operator | |
| on: | |
| workflow_dispatch: | |
| pull_request: | |
| paths: | |
| - operator/** | |
| - .github/workflows/operator.yml | |
| - .github/workflows/scripts | |
| - "!operator/webapp/**" | |
| - '!**.md' | |
| - '!operator/examples/**' | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - operator/** | |
| - "!operator/webapp/**" | |
| - '!**.md' | |
| - '!operator/examples/**' | |
| env: | |
| WORKING_DIR: ./operator | |
| jobs: | |
| verify-versions: | |
| if: github.ref != 'refs/heads/main' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - run: sh .github/workflows/scripts/verify_operator_releasable.sh | |
| name: Verify operator is in a state to be released on merge | |
| build: | |
| if: github.ref != 'refs/heads/main' | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| shell: bash | |
| working-directory: ${{ env.WORKING_DIR }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - run: make prep-release | |
| name: generate release files | |
| release: | |
| if: github.ref == 'refs/heads/main' | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| shell: bash | |
| working-directory: ${{ env.WORKING_DIR }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| # set variables used by multiple steps in the job | |
| - run: | | |
| TAG_NAME=$(make get-tag) | |
| echo "TAG_NAME=$TAG_NAME" >> "$GITHUB_OUTPUT" | |
| cat $GITHUB_OUTPUT | |
| id: naming-selector | |
| name: generate names for artifacts | |
| - run: | | |
| git fetch --tags | |
| if ! git rev-parse -q --verify "refs/tags/${{ steps.naming-selector.outputs.TAG_NAME }}"; then | |
| echo "needs_release=true" >> $GITHUB_ENV | |
| fi | |
| name: check if release is needed | |
| - run: make prep-release | |
| if: env.needs_release == 'true' | |
| name: generate release files | |
| - uses: mathieudutour/github-tag-action@v6.1 | |
| if: env.needs_release == 'true' | |
| id: tag_version | |
| with: | |
| custom_tag: ${{ steps.naming-selector.outputs.TAG_NAME }} | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| # avoid v prefix before tag | |
| tag_prefix: "" | |
| - uses: ncipollo/release-action@v1 | |
| if: env.needs_release == 'true' | |
| with: | |
| tag: ${{ steps.tag_version.outputs.new_tag }} | |
| name: Release ${{ steps.tag_version.outputs.new_tag }} | |
| body: ${{ steps.tag_version.outputs.changelog }} | |
| artifactErrorsFailBuild: true | |
| artifacts: ${{ env.WORKING_DIR }}/output/**/*.yaml |