Add python version inputs #1
Workflow file for this run
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: build-node | ||
| on: | ||
| workflow_call: | ||
| inputs: | ||
| branch: | ||
| type: string | ||
| required: false | ||
| default: ${{ github.ref || github.head_ref }} | ||
| chromatic_enable: | ||
| description: 'Enable Chromatic tests' | ||
| required: false | ||
| type: boolean | ||
| default: false | ||
| node_run_webpack: | ||
| description: "Flag to always run the webpack production build." | ||
| type: boolean | ||
| required: false | ||
| default: false | ||
| runs_on: | ||
| type: string | ||
| required: false | ||
| default: "ubuntu-22.04" | ||
| node_version: | ||
| type: string | ||
| required: false | ||
| secrets: | ||
| DATAVISYN_BOT_REPO_TOKEN: | ||
| required: false | ||
| NODE_VERSION: | ||
| required: false | ||
| CHROMATIC_PROJECT_TOKEN: | ||
| required: false | ||
| env: | ||
| NPM_REGISTRY: "https://registry.npmjs.org/" | ||
| NODE_VERSION: ${{ vars.NODE_VERSION || "3.10" }} | ||
| WORKFLOW_BRANCH: "main" | ||
| permissions: | ||
| contents: read | ||
| id-token: write | ||
| concurrency: | ||
| group: '${{ github.workflow }}-${{ github.ref || github.head_ref }}' | ||
| cancel-in-progress: true | ||
| jobs: | ||
| build-node: | ||
| concurrency: | ||
| group: "node-${{ github.workflow }}-${{ github.ref || github.head_ref }}-${{ inputs.branch }}" | ||
| cancel-in-progress: true | ||
| permissions: | ||
| id-token: write | ||
| contents: write | ||
| runs-on: ${{ inputs.runs_on || 'ubuntu-22.04' }} | ||
| steps: | ||
| - name: Checkout source repository | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| ref: ${{ inputs.branch }} | ||
| token: ${{ github.event.repository.private == true && secrets.DATAVISYN_BOT_REPO_TOKEN || github.token }} | ||
| fetch-depth: ${{ inputs.chromatic_enable && '0' || '1' }} | ||
| - name: Checkout github-workflows | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| repository: datavisyn/github-workflows | ||
| ref: ${{ env.WORKFLOW_BRANCH }} | ||
| path: ./tmp/github-workflows | ||
| - name: Build node | ||
| uses: ./tmp/github-workflows/.github/actions/build-node-python | ||
| with: | ||
| enable_node: true | ||
| enable_python: false | ||
| node_version: ${{ inputs.node_version || secrets.NODE_VERSION || env.NODE_VERSION }} | ||
| npm_registry: ${{ env.NPM_REGISTRY }} | ||
| github_ro_token: ${{ github.event.repository.private == true && secrets.DATAVISYN_BOT_REPO_TOKEN || github.token }} | ||
| run_node_bundle: ${{ inputs.node_run_webpack }} | ||
| enable_node_cache: ${{ inputs.runs_on != 'self-hosted' }} | ||
| chromatic_enable: ${{ inputs.chromatic_enable }} | ||
| chromatic_project_token: ${{ secrets.CHROMATIC_PROJECT_TOKEN }} | ||