-
Notifications
You must be signed in to change notification settings - Fork 0
75 lines (68 loc) · 2.22 KB
/
test.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
name: Test
on: push
jobs:
# confirm we can pull a single file from the current repo
checkout_from_this_repo:
name: This Repo/This Branch
runs-on: ubuntu-latest
steps:
- uses: scribd/checkout-file-action@v3
with:
file-path: tests/hello-world.txt
- run: cat tests/hello-world.txt
# confirm we can pull a folder from the current repo
checkout_folder_from_this_repo:
name: This Repo/This Branch Get Folder
runs-on: ubuntu-latest
steps:
- uses: scribd/checkout-file-action@v3
with:
file-path: |
tests
index.js
- run: cat tests/hello-world.txt && cat tests/nested/file.txt && cat index.js
checkout_binary_from_this_repo:
name: This Repo/Branch Get Binary
runs-on: ubuntu-latest
steps:
- uses: scribd/checkout-file-action@v3
with:
file-path: |
tests
index.js
- run: du -h tests/star.png | grep 44K
# confirm we can pull two files from the current repo on a specific branch
checkout_from_this_repo_with_branch:
name: This Repo/Custom Branch
runs-on: ubuntu-latest
steps:
- uses: scribd/checkout-file-action@v3
with:
file-path: |
tests/hello-world.txt
tests/other-file.txt
branch: testing
- run: cat tests/hello-world.txt && cat tests/other-file.txt
# confirm we can pull a single file from a public repo
checkout_from_public_repo:
name: Public Repo/Default Branch
runs-on: ubuntu-latest
steps:
- uses: scribd/checkout-file-action@v3
with:
file-path: action.yml
repo: actions/cache
- run: cat action.yml
# confirm we can pull a single file from a private repo
# to enable this test fork the repo and set `secrets.ACCESS_TOKEN`
checkout_from_private_repo:
name: Private Repo/Default Branch
runs-on: ubuntu-latest
if: ${{ github.repository != 'scribd/checkout-file-action' }}
steps:
- uses: scribd/checkout-file-action@v3
with:
file-path: tests/hello-world.txt
repo: scribd/checkout-file-action-private-mirror
github-token: ${{ secrets.ACCESS_TOKEN }}
- run: cat tests/hello-world.txt