8
8
push :
9
9
branches :
10
10
- main
11
+ tags :
12
+ - ' **'
11
13
paths-ignore :
12
14
- .gitattributes
13
15
- .gitignore
@@ -23,8 +25,6 @@ permissions: {}
23
25
jobs :
24
26
positive :
25
27
runs-on : ubuntu-latest
26
- permissions :
27
- contents : read
28
28
strategy :
29
29
matrix :
30
30
mode :
@@ -44,25 +44,24 @@ jobs:
44
44
45
45
steps :
46
46
- uses : actions/checkout@v4
47
+ with :
48
+ path : local-action
47
49
48
50
- name : Create fake composer.json
49
- run : cp testdata/${{ matrix.case }}.composer.json composer.json
51
+ run : cp local-action/ testdata/${{ matrix.case }}.composer.json composer.json
50
52
51
- - name : Use local action
53
+ - uses : ./ local- action
52
54
id : subject
53
- uses : ./
54
55
with :
55
56
mode : ${{ matrix.mode }}
56
57
source : ${{ matrix.source }}
57
58
58
59
- run : echo '${{ steps.subject.outputs.matrix }}' > actual.json
59
60
60
- - run : diff <(jq --sort-keys . actual.json) <(jq --sort-keys . testdata/${{ matrix.case }}.${{ matrix.mode }}.golden.json)
61
+ - run : diff <(jq --sort-keys . actual.json) <(jq --sort-keys . local-action/ testdata/${{ matrix.case }}.${{ matrix.mode }}.golden.json)
61
62
62
63
negative :
63
64
runs-on : ubuntu-latest
64
- permissions :
65
- contents : read
66
65
strategy :
67
66
matrix :
68
67
mode :
@@ -82,13 +81,14 @@ jobs:
82
81
83
82
steps :
84
83
- uses : actions/checkout@v4
84
+ with :
85
+ path : local-action
85
86
86
87
- name : Create fake composer.json
87
- run : cp testdata/${{ matrix.case }}.composer.json composer.json
88
+ run : cp local-action/ testdata/${{ matrix.case }}.composer.json composer.json
88
89
89
- - name : Use local action
90
+ - uses : ./ local- action
90
91
id : subject
91
- uses : ./
92
92
with :
93
93
mode : ${{ matrix.mode }}
94
94
source : ${{ matrix.source }}
@@ -100,8 +100,6 @@ jobs:
100
100
101
101
missing :
102
102
runs-on : ubuntu-latest
103
- permissions :
104
- contents : read
105
103
strategy :
106
104
matrix :
107
105
mode :
@@ -114,13 +112,14 @@ jobs:
114
112
115
113
steps :
116
114
- uses : actions/checkout@v4
115
+ with :
116
+ path : local-action
117
117
118
118
- name : Ensure no composer.json
119
119
run : rm -f composer.json
120
120
121
- - name : Use local action
121
+ - uses : ./ local- action
122
122
id : subject
123
- uses : ./
124
123
with :
125
124
mode : ${{ matrix.mode }}
126
125
source : ${{ matrix.source }}
@@ -129,4 +128,3 @@ jobs:
129
128
- name : Assert action failed
130
129
if : steps.subject.outcome != 'failure'
131
130
run : exit 1
132
-
0 commit comments