-
Notifications
You must be signed in to change notification settings - Fork 2
65 lines (53 loc) · 1.41 KB
/
metadata.yaml
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: Test metadata access
on:
push:
branches:
- main
pull_request:
branches:
- "*"
schedule:
- cron: "55 */6 * * *"
workflow_dispatch:
permissions:
contents: read
jobs:
invalid-metadata:
runs-on:
- namespace-profile-default
steps:
- uses: actions/checkout@v4
- run: |
sudo mkdir -p /cache/.ns
sudo chown -R runner /cache
echo "foo" > /cache/.ns/cache-metadata.json
# Should not fail despite cache-metadata being invalid.
- name: Set up NPM cache
uses: ./ # Uses an action in the root directory
with:
path: .npm
env:
NSC_CACHE_PATH: /cache
- name: Print cache metadata file
run: cat /cache/.ns/cache-metadata.json
owned-by-root:
runs-on:
- namespace-profile-default
steps:
- uses: actions/checkout@v4
- run: |
sudo mkdir -p /cache/.ns
sudo chown -R runner /cache
echo "{}" > /cache/.ns/cache-metadata.json
sudo chown -R root /cache/.ns
# Should not fail despite cache-metadata being owned by root.
- name: Set up NPM cache
uses: ./ # Uses an action in the root directory
with:
path: .npm
env:
NSC_CACHE_PATH: /cache
- name: Print cache metadata file
run: |
ls -al /cache/.ns
cat /cache/.ns/cache-metadata.json