565995e715
- Pin all third-party actions to SHA - Gate claude.yml triggers to internal authors with Harden-Runner egress audit - Ignore fork-PR lifecycle scripts - Narrow cross-repo dispatch payloads - Add 7d npm release-age gate - Add CODEOWNERS on .github/** and .yarnrc.yml --------- Co-authored-by: prastoin <paul@twenty.com>
36 lines
1.1 KiB
YAML
36 lines
1.1 KiB
YAML
name: Nx Affected CI
|
|
inputs:
|
|
parallel:
|
|
required: false
|
|
default: '3'
|
|
tag:
|
|
required: false
|
|
tasks:
|
|
required: true
|
|
configuration:
|
|
required: false
|
|
default: 'ci'
|
|
args:
|
|
required: false
|
|
runs:
|
|
using: "composite"
|
|
steps:
|
|
- name: Fetch main branch for diff
|
|
shell: bash
|
|
run: git fetch origin main --depth=1
|
|
- name: Get last successful commit
|
|
if: env.NX_BASE == ''
|
|
uses: nrwl/nx-set-shas@3e9ad7370203c1e93d109be57f3b72eb0eb511b1 # v4
|
|
- name: Fallback to origin/main if no base found
|
|
if: env.NX_BASE == ''
|
|
shell: bash
|
|
run: echo "NX_BASE=$(git rev-parse origin/main)" >> $GITHUB_ENV
|
|
- name: Run affected command
|
|
shell: bash
|
|
env:
|
|
NX_CONFIGURATION: ${{ inputs.configuration }}
|
|
NX_TASKS: ${{ inputs.tasks }}
|
|
NX_PARALLEL: ${{ inputs.parallel }}
|
|
NX_TAG: ${{ inputs.tag }}
|
|
NX_ARGS: ${{ inputs.args }}
|
|
run: npx nx affected --nxBail --configuration="$NX_CONFIGURATION" -t="$NX_TASKS" --parallel="$NX_PARALLEL" --exclude="*,!tag:$NX_TAG" $NX_ARGS |