## Introduction
Unless I'm mistaken neither the `inputs.type` or `inputs.type` syntax
exists for `composite actions`.
By default it seems like any `Composite action` inputs are considered as
`string`.
```yml
name: Nx Affected CI
inputs:
parallel:
required: false
types: [number]
default: 3
tag:
required: false
types: [string]
tasks:
required: true
types: [string]
```
## Suggestion
To avoid misunderstanding of our composite actions inputs signature I
would recommend removing any `type` props but also default any inputs as
`strings`
## Misc
- Please find related GitHub community discussion
https://github.com/orgs/community/discussions/65588
30 lines
959 B
YAML
30 lines
959 B
YAML
name: Restore cache
|
|
inputs:
|
|
key:
|
|
required: true
|
|
description: Prefix to the cache key
|
|
additional-paths:
|
|
required: false
|
|
outputs:
|
|
cache-primary-key:
|
|
description: actions/cache/restore cache-primary-key outputs proxy
|
|
value: ${{ steps.restore-cache.outputs.cache-primary-key }}
|
|
cache-hit:
|
|
description: String bool indicating whether cache has been directly or indirectly hit
|
|
value: ${{ steps.restore-cache.outputs.cache-hit != 'false' || steps.restore-cache.outputs.cache-matched-key != '' }}
|
|
|
|
runs:
|
|
using: composite
|
|
steps:
|
|
- name: Restore cache
|
|
uses: actions/cache/restore@v4
|
|
id: restore-cache
|
|
with:
|
|
path: |
|
|
.cache
|
|
.nx/cache
|
|
node_modules/.cache
|
|
packages/*/node_modules/.cache
|
|
${{ inputs.additional-paths }}
|
|
key: ${{ inputs.key }}-${{ github.ref_name }}-${{ github.sha }}
|
|
restore-keys: ${{ inputs.key }}-${{ github.ref_name }}- |