✨ 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:
|
on:
|
||||||
workflow_call:
|
workflow_call:
|
||||||
|
inputs:
|
||||||
|
working-directory:
|
||||||
|
description: 'Cartella che contiene package.json, relativa alla root del repo. Default: la root.'
|
||||||
|
type: string
|
||||||
|
default: '.'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
auto-release:
|
auto-release:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
working-directory: ${{ inputs.working-directory || '.' }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: https://github.com/actions/checkout@v6
|
uses: https://github.com/actions/checkout@v6
|
||||||
|
|||||||
@@ -2,10 +2,18 @@ name: Auto Release
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_call:
|
workflow_call:
|
||||||
|
inputs:
|
||||||
|
working-directory:
|
||||||
|
description: 'Cartella che contiene package.json, relativa alla root del repo. Default: la root.'
|
||||||
|
type: string
|
||||||
|
default: '.'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
auto-release:
|
auto-release:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
working-directory: ${{ inputs.working-directory || '.' }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: https://gitea.com/actions/checkout@v6
|
uses: https://gitea.com/actions/checkout@v6
|
||||||
|
|||||||
@@ -3,6 +3,10 @@ name: Dependency Audit
|
|||||||
on:
|
on:
|
||||||
workflow_call:
|
workflow_call:
|
||||||
inputs:
|
inputs:
|
||||||
|
working-directory:
|
||||||
|
description: 'Cartella che contiene package.json, relativa alla root del repo. Default: la root.'
|
||||||
|
type: string
|
||||||
|
default: '.'
|
||||||
node-version:
|
node-version:
|
||||||
type: string
|
type: string
|
||||||
default: '24.16.0'
|
default: '24.16.0'
|
||||||
@@ -11,6 +15,9 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
dependency-audit:
|
dependency-audit:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
working-directory: ${{ inputs.working-directory || '.' }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: https://github.com/actions/checkout@v6
|
uses: https://github.com/actions/checkout@v6
|
||||||
|
|||||||
@@ -3,6 +3,10 @@ name: Dependency Audit
|
|||||||
on:
|
on:
|
||||||
workflow_call:
|
workflow_call:
|
||||||
inputs:
|
inputs:
|
||||||
|
working-directory:
|
||||||
|
description: 'Cartella che contiene package.json, relativa alla root del repo. Default: la root.'
|
||||||
|
type: string
|
||||||
|
default: '.'
|
||||||
node-version:
|
node-version:
|
||||||
type: string
|
type: string
|
||||||
default: '24.16.0'
|
default: '24.16.0'
|
||||||
@@ -11,6 +15,9 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
dependency-audit:
|
dependency-audit:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
working-directory: ${{ inputs.working-directory || '.' }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: https://gitea.com/actions/checkout@v6
|
uses: https://gitea.com/actions/checkout@v6
|
||||||
|
|||||||
@@ -3,6 +3,10 @@ name: Dependency Outdated
|
|||||||
on:
|
on:
|
||||||
workflow_call:
|
workflow_call:
|
||||||
inputs:
|
inputs:
|
||||||
|
working-directory:
|
||||||
|
description: 'Cartella che contiene package.json, relativa alla root del repo. Default: la root.'
|
||||||
|
type: string
|
||||||
|
default: '.'
|
||||||
node-version:
|
node-version:
|
||||||
type: string
|
type: string
|
||||||
default: '24.16.0'
|
default: '24.16.0'
|
||||||
@@ -11,6 +15,9 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
dependency-outdated:
|
dependency-outdated:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
working-directory: ${{ inputs.working-directory || '.' }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: https://github.com/actions/checkout@v6
|
uses: https://github.com/actions/checkout@v6
|
||||||
|
|||||||
@@ -3,6 +3,10 @@ name: Dependency Outdated
|
|||||||
on:
|
on:
|
||||||
workflow_call:
|
workflow_call:
|
||||||
inputs:
|
inputs:
|
||||||
|
working-directory:
|
||||||
|
description: 'Cartella che contiene package.json, relativa alla root del repo. Default: la root.'
|
||||||
|
type: string
|
||||||
|
default: '.'
|
||||||
node-version:
|
node-version:
|
||||||
type: string
|
type: string
|
||||||
default: '24.16.0'
|
default: '24.16.0'
|
||||||
@@ -11,6 +15,9 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
dependency-outdated:
|
dependency-outdated:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
working-directory: ${{ inputs.working-directory || '.' }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: https://gitea.com/actions/checkout@v6
|
uses: https://gitea.com/actions/checkout@v6
|
||||||
|
|||||||
@@ -3,6 +3,10 @@ name: Publish npm Package
|
|||||||
on:
|
on:
|
||||||
workflow_call:
|
workflow_call:
|
||||||
inputs:
|
inputs:
|
||||||
|
working-directory:
|
||||||
|
description: 'Cartella che contiene package.json, relativa alla root del repo. Default: la root.'
|
||||||
|
type: string
|
||||||
|
default: '.'
|
||||||
node-version:
|
node-version:
|
||||||
type: string
|
type: string
|
||||||
default: '24.16.0'
|
default: '24.16.0'
|
||||||
@@ -10,6 +14,9 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
npm-publish:
|
npm-publish:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
working-directory: ${{ inputs.working-directory || '.' }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: https://github.com/actions/checkout@v6
|
uses: https://github.com/actions/checkout@v6
|
||||||
|
|||||||
@@ -3,6 +3,10 @@ name: Publish npm Package
|
|||||||
on:
|
on:
|
||||||
workflow_call:
|
workflow_call:
|
||||||
inputs:
|
inputs:
|
||||||
|
working-directory:
|
||||||
|
description: 'Cartella che contiene package.json, relativa alla root del repo. Default: la root.'
|
||||||
|
type: string
|
||||||
|
default: '.'
|
||||||
node-version:
|
node-version:
|
||||||
type: string
|
type: string
|
||||||
default: '24.16.0'
|
default: '24.16.0'
|
||||||
@@ -10,6 +14,9 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
npm-publish:
|
npm-publish:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
working-directory: ${{ inputs.working-directory || '.' }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: https://gitea.com/actions/checkout@v6
|
uses: https://gitea.com/actions/checkout@v6
|
||||||
|
|||||||
@@ -3,6 +3,10 @@ name: Quality Gates
|
|||||||
on:
|
on:
|
||||||
workflow_call:
|
workflow_call:
|
||||||
inputs:
|
inputs:
|
||||||
|
working-directory:
|
||||||
|
description: 'Cartella che contiene package.json, relativa alla root del repo. Default: la root.'
|
||||||
|
type: string
|
||||||
|
default: '.'
|
||||||
node-version:
|
node-version:
|
||||||
type: string
|
type: string
|
||||||
default: '24.16.0'
|
default: '24.16.0'
|
||||||
@@ -13,6 +17,9 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
quality-gates:
|
quality-gates:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
working-directory: ${{ inputs.working-directory || '.' }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: https://github.com/actions/checkout@v6
|
uses: https://github.com/actions/checkout@v6
|
||||||
|
|||||||
@@ -3,6 +3,10 @@ name: Quality Gates
|
|||||||
on:
|
on:
|
||||||
workflow_call:
|
workflow_call:
|
||||||
inputs:
|
inputs:
|
||||||
|
working-directory:
|
||||||
|
description: 'Cartella che contiene package.json, relativa alla root del repo. Default: la root.'
|
||||||
|
type: string
|
||||||
|
default: '.'
|
||||||
node-version:
|
node-version:
|
||||||
type: string
|
type: string
|
||||||
default: '24.16.0'
|
default: '24.16.0'
|
||||||
@@ -13,6 +17,9 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
quality-gates:
|
quality-gates:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
working-directory: ${{ inputs.working-directory || '.' }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: https://gitea.com/actions/checkout@v6
|
uses: https://gitea.com/actions/checkout@v6
|
||||||
|
|||||||
Reference in New Issue
Block a user