diff --git a/actions/git/repository-dispatch/action.yaml b/actions/git/repository-dispatch/action.yaml new file mode 100644 index 00000000..5f7fa0ec --- /dev/null +++ b/actions/git/repository-dispatch/action.yaml @@ -0,0 +1,32 @@ +name: Repository Dispatch +author: 'MiLaboratories' +description: | + Create a repository dispatch event + + See original action peter-evans/repository-dispatch/ + +inputs: + token: + description: 'GITHUB_TOKEN or a `repo` scoped Personal Access Token (PAT)' + default: ${{ github.token }} + repository: + description: 'The full name of the repository to send the dispatch.' + default: ${{ github.repository }} + event-type: + description: 'A custom webhook event name.' + required: true + client-payload: + description: 'JSON payload with extra information about the webhook event that your action or worklow may use.' + default: '{}' + +runs: + using: "composite" + + steps: + - name: Repository Dispatch + uses: peter-evans/repository-dispatch@ff45666b9427631e3450c54a1bcbee4d9ff4d7c0 + with: + token: ${{ inputs.token }} + repository: ${{ inputs.repository }} + event-type: ${{ inputs.event-type }} + client-payload: ${{ inputs.client-payload }} \ No newline at end of file diff --git a/actions/helpers/jq/action.yaml b/actions/helpers/jq/action.yaml index 25b8f088..8772fc6a 100644 --- a/actions/helpers/jq/action.yaml +++ b/actions/helpers/jq/action.yaml @@ -25,7 +25,7 @@ runs: steps: - id: jq - uses: milaboratory/github-ci/actions/shell@v4-beta + uses: milaboratory/github-ci/actions/shell@v4 env: INPUT_FILE: ${{ inputs.file }} JQ_SELECT: ${{ inputs.select }} diff --git a/actions/node/cache/action.yaml b/actions/node/cache/action.yaml index 273e149f..a503e8e7 100644 --- a/actions/node/cache/action.yaml +++ b/actions/node/cache/action.yaml @@ -26,6 +26,12 @@ inputs: required: false default: 'true' + hashfiles-search-path: + description: | + Hashfiles search path for package-lock.json + required: false + default: '**/package-lock.json' + runs: using: "composite" @@ -37,7 +43,7 @@ runs: path: | ~/.cache/electron/ ~/Library/Caches/electron/ - key: ${{ runner.OS }}-cache-${{ inputs.cache-version }}-electron-${{ hashFiles('**/package-lock.json') }} + key: ${{ runner.OS }}-cache-${{ inputs.cache-version }}-electron-${{ hashFiles(inputs.hashfiles-search-path) }} restore-keys: | ${{ runner.OS }}-cache-${{ inputs.cache-version }}-electron- @@ -46,7 +52,7 @@ runs: uses: actions/cache@v4 with: path: node_modules - key: ${{ runner.OS }}-cache-${{ inputs.cache-version }}-node_modules-${{ hashFiles('**/package-lock.json') }} + key: ${{ runner.OS }}-cache-${{ inputs.cache-version }}-node_modules-${{ hashFiles(inputs.hashfiles-search-path) }} restore-keys: | ${{ runner.OS }}-cache-${{ inputs.cache-version }}-node_modules- @@ -55,6 +61,6 @@ runs: if: inputs.is-electron-application == 'false' with: path: ~/.npm - key: ${{ runner.OS }}-cache-${{ inputs.cache-version }}-genericnodejs-${{ hashFiles('**/package-lock.json') }} + key: ${{ runner.OS }}-cache-${{ inputs.cache-version }}-genericnodejs-${{ hashFiles(inputs.hashfiles-search-path) }} restore-keys: | ${{ runner.OS }}-cache-${{ inputs.cache-version }}-genericnodejs- diff --git a/actions/node/prepare/action.yaml b/actions/node/prepare/action.yaml index 82c8c467..230918d9 100644 --- a/actions/node/prepare/action.yaml +++ b/actions/node/prepare/action.yaml @@ -20,6 +20,12 @@ inputs: required: false default: 'v1' + hashfiles-search-path: + description: | + Hashfiles search path for package-lock.json + required: false + default: '**/package-lock.json' + is-electron-application: description: | If 'true' enables cache for an Electron application, @@ -62,5 +68,6 @@ runs: uses: milaboratory/github-ci/actions/node/cache@v4 with: is-electron-application: ${{ inputs.is-electron-application }} + hashfiles-search-path: ${{ inputs.hashfiles-search-path }} cache-version: ${{ inputs.cache-version }} local-cache: 'on'