-
Notifications
You must be signed in to change notification settings - Fork 6
49 lines (44 loc) · 1.46 KB
/
cache.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: cache
on:
workflow_dispatch:
inputs:
branch:
description: name of the branch to filter, example refs/pull/1136/merge
type: string
filter:
description: filter of keys to search for, example node-cache-Linux-
type: string
rebuild:
description: when enabled, cache will be generated in the branch which action was called from
type: boolean
default: false
workflow_call:
inputs:
branch:
description: name of the branch to filter, example refs/pull/1136/merge
type: string
filter:
description: filter of keys to search for, example node-cache-Linux-
type: string
rebuild:
description: when enabled, cache will be generated in the branch which action was called from
type: boolean
default: false
jobs:
maintain:
runs-on: 'ubuntu-latest'
steps:
- uses: actions/checkout@v4
- name: Setup node and install deps
id: install
if: ${{ inputs.rebuild == 'true' || inputs.rebuild == true }}
uses: ./.github/workflows/actions/node-setup
- name: Clear cache
uses: ./.github/workflows/actions/clear-cache
continue-on-error: true
with:
branch: ${{ inputs.branch }}
filter: ${{ inputs.filter }}
- name: Generate cache for source code
if: ${{ steps.install.outcome == 'success' }}
uses: ./.github/workflows/actions/build-packages