✨ feat(ci): aggiungi l'input working-directory ai reusable workflow Node
- quality-gates, dependency-check, dependency-outdated, npm-publish e auto-release accettano ora working-directory (default "."), applicato via defaults.run a livello di job: copre tutti gli step run senza toccare gli step uses, che devono restare sulla root - Allineate le varianti -github dei cinque workflow - Sblocca i repo dove package.json non e' in root (pzeta-calendar in typescript/, pzeta-king in server/), che finora dovevano rinunciare ai template e reinlineare i job, perdendo la working-directory a ogni riallineamento - Retrocompatibile: con l'input omesso il comportamento resta identico refs #4
This commit is contained in:
@@ -2,10 +2,18 @@ name: Auto Release
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
working-directory:
|
||||
description: 'Cartella che contiene package.json, relativa alla root del repo. Default: la root.'
|
||||
type: string
|
||||
default: '.'
|
||||
|
||||
jobs:
|
||||
auto-release:
|
||||
runs-on: ubuntu-latest
|
||||
defaults:
|
||||
run:
|
||||
working-directory: ${{ inputs.working-directory || '.' }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: https://github.com/actions/checkout@v6
|
||||
|
||||
@@ -2,10 +2,18 @@ name: Auto Release
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
working-directory:
|
||||
description: 'Cartella che contiene package.json, relativa alla root del repo. Default: la root.'
|
||||
type: string
|
||||
default: '.'
|
||||
|
||||
jobs:
|
||||
auto-release:
|
||||
runs-on: ubuntu-latest
|
||||
defaults:
|
||||
run:
|
||||
working-directory: ${{ inputs.working-directory || '.' }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: https://gitea.com/actions/checkout@v6
|
||||
|
||||
@@ -3,6 +3,10 @@ name: Dependency Audit
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
working-directory:
|
||||
description: 'Cartella che contiene package.json, relativa alla root del repo. Default: la root.'
|
||||
type: string
|
||||
default: '.'
|
||||
node-version:
|
||||
type: string
|
||||
default: '24.16.0'
|
||||
@@ -11,6 +15,9 @@ on:
|
||||
jobs:
|
||||
dependency-audit:
|
||||
runs-on: ubuntu-latest
|
||||
defaults:
|
||||
run:
|
||||
working-directory: ${{ inputs.working-directory || '.' }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: https://github.com/actions/checkout@v6
|
||||
|
||||
@@ -3,6 +3,10 @@ name: Dependency Audit
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
working-directory:
|
||||
description: 'Cartella che contiene package.json, relativa alla root del repo. Default: la root.'
|
||||
type: string
|
||||
default: '.'
|
||||
node-version:
|
||||
type: string
|
||||
default: '24.16.0'
|
||||
@@ -11,6 +15,9 @@ on:
|
||||
jobs:
|
||||
dependency-audit:
|
||||
runs-on: ubuntu-latest
|
||||
defaults:
|
||||
run:
|
||||
working-directory: ${{ inputs.working-directory || '.' }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: https://gitea.com/actions/checkout@v6
|
||||
|
||||
@@ -3,6 +3,10 @@ name: Dependency Outdated
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
working-directory:
|
||||
description: 'Cartella che contiene package.json, relativa alla root del repo. Default: la root.'
|
||||
type: string
|
||||
default: '.'
|
||||
node-version:
|
||||
type: string
|
||||
default: '24.16.0'
|
||||
@@ -11,6 +15,9 @@ on:
|
||||
jobs:
|
||||
dependency-outdated:
|
||||
runs-on: ubuntu-latest
|
||||
defaults:
|
||||
run:
|
||||
working-directory: ${{ inputs.working-directory || '.' }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: https://github.com/actions/checkout@v6
|
||||
|
||||
@@ -3,6 +3,10 @@ name: Dependency Outdated
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
working-directory:
|
||||
description: 'Cartella che contiene package.json, relativa alla root del repo. Default: la root.'
|
||||
type: string
|
||||
default: '.'
|
||||
node-version:
|
||||
type: string
|
||||
default: '24.16.0'
|
||||
@@ -11,6 +15,9 @@ on:
|
||||
jobs:
|
||||
dependency-outdated:
|
||||
runs-on: ubuntu-latest
|
||||
defaults:
|
||||
run:
|
||||
working-directory: ${{ inputs.working-directory || '.' }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: https://gitea.com/actions/checkout@v6
|
||||
|
||||
@@ -3,6 +3,10 @@ name: Publish npm Package
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
working-directory:
|
||||
description: 'Cartella che contiene package.json, relativa alla root del repo. Default: la root.'
|
||||
type: string
|
||||
default: '.'
|
||||
node-version:
|
||||
type: string
|
||||
default: '24.16.0'
|
||||
@@ -10,6 +14,9 @@ on:
|
||||
jobs:
|
||||
npm-publish:
|
||||
runs-on: ubuntu-latest
|
||||
defaults:
|
||||
run:
|
||||
working-directory: ${{ inputs.working-directory || '.' }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: https://github.com/actions/checkout@v6
|
||||
|
||||
@@ -3,6 +3,10 @@ name: Publish npm Package
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
working-directory:
|
||||
description: 'Cartella che contiene package.json, relativa alla root del repo. Default: la root.'
|
||||
type: string
|
||||
default: '.'
|
||||
node-version:
|
||||
type: string
|
||||
default: '24.16.0'
|
||||
@@ -10,6 +14,9 @@ on:
|
||||
jobs:
|
||||
npm-publish:
|
||||
runs-on: ubuntu-latest
|
||||
defaults:
|
||||
run:
|
||||
working-directory: ${{ inputs.working-directory || '.' }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: https://gitea.com/actions/checkout@v6
|
||||
|
||||
@@ -3,6 +3,10 @@ name: Quality Gates
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
working-directory:
|
||||
description: 'Cartella che contiene package.json, relativa alla root del repo. Default: la root.'
|
||||
type: string
|
||||
default: '.'
|
||||
node-version:
|
||||
type: string
|
||||
default: '24.16.0'
|
||||
@@ -13,6 +17,9 @@ on:
|
||||
jobs:
|
||||
quality-gates:
|
||||
runs-on: ubuntu-latest
|
||||
defaults:
|
||||
run:
|
||||
working-directory: ${{ inputs.working-directory || '.' }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: https://github.com/actions/checkout@v6
|
||||
|
||||
@@ -3,6 +3,10 @@ name: Quality Gates
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
working-directory:
|
||||
description: 'Cartella che contiene package.json, relativa alla root del repo. Default: la root.'
|
||||
type: string
|
||||
default: '.'
|
||||
node-version:
|
||||
type: string
|
||||
default: '24.16.0'
|
||||
@@ -13,6 +17,9 @@ on:
|
||||
jobs:
|
||||
quality-gates:
|
||||
runs-on: ubuntu-latest
|
||||
defaults:
|
||||
run:
|
||||
working-directory: ${{ inputs.working-directory || '.' }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: https://gitea.com/actions/checkout@v6
|
||||
|
||||
Reference in New Issue
Block a user