Skip to content

Commit 14b9aaa

Browse files
committed
Use a maintained action for "changed files"
And replace "dummy" with "sample" in go tests to make `woke` happy :) Signed-off-by: Vincent Demeester <[email protected]>
1 parent fced45f commit 14b9aaa

File tree

6 files changed

+244
-233
lines changed

6 files changed

+244
-233
lines changed

.github/workflows/woke.yml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,20 @@ jobs:
77
runs-on: ubuntu-latest
88
steps:
99
- name: 'Checkout'
10-
uses: actions/checkout@v2
11-
12-
- uses: jitterbit/get-changed-files@v1
13-
id: files
10+
uses: actions/checkout@v4
11+
12+
- name: Get changed files
13+
id: changed-files
14+
uses: tj-actions/changed-files@v40
15+
with:
16+
write_output_files: true
17+
files: |
18+
**
1419
1520
- name: 'woke'
21+
if: steps.changed-files.outputs.any_changed == 'true'
1622
uses: get-woke/woke-action@v0
1723
with:
1824
# Cause the check to fail on any broke rules
1925
fail-on-error: true
20-
# See https://github.com/marketplace/actions/get-all-changed-files
21-
# for more options
22-
woke-args: ${{ steps.files.outputs.added_modified }}
26+
woke-args: ${{ steps.changed_files.outputs.all_changed_files }}

.wokeignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
go.mod
22
go.sum
33
vendor
4+
config/dummy.go
5+
.wokeignore

pkg/apis/pipeline/v1beta1/resource_types_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@ import (
2121
var (
2222
prependStep = v1beta1.Step{
2323
Name: "prepend-step",
24-
Image: "dummy",
24+
Image: "sample",
2525
Command: []string{"doit"},
2626
Args: []string{"stuff", "things"},
2727
}
2828
appendStep = v1beta1.Step{
2929
Name: "append-step",
30-
Image: "dummy",
30+
Image: "sample",
3131
Command: []string{"doit"},
3232
Args: []string{"other stuff", "other things"},
3333
}

pkg/reconciler/pipelinerun/resources/pipelineref_test.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,9 @@ import (
5353
)
5454

5555
var (
56-
dummyPipeline = &v1.Pipeline{
56+
samplePipeline = &v1.Pipeline{
5757
ObjectMeta: metav1.ObjectMeta{
58-
Name: "dummy",
58+
Name: "sample",
5959
Namespace: "default",
6060
},
6161
TypeMeta: metav1.TypeMeta{
@@ -130,7 +130,7 @@ func TestLocalPipelineRef(t *testing.T) {
130130
}{
131131
{
132132
name: "local-pipeline",
133-
pipelines: []runtime.Object{simplePipeline(), dummyPipeline},
133+
pipelines: []runtime.Object{simplePipeline(), samplePipeline},
134134
ref: &v1.PipelineRef{
135135
Name: "simple",
136136
},
@@ -191,9 +191,9 @@ func TestGetPipelineFunc_Local(t *testing.T) {
191191
name: "local-pipeline",
192192
localPipelines: []runtime.Object{
193193
simplePipelineWithBaseSpec(),
194-
dummyPipeline,
194+
samplePipeline,
195195
},
196-
remotePipelines: []runtime.Object{simplePipeline(), dummyPipeline},
196+
remotePipelines: []runtime.Object{simplePipeline(), samplePipeline},
197197
ref: &v1.PipelineRef{
198198
Name: "simple",
199199
},
@@ -240,7 +240,7 @@ func TestGetPipelineFuncSpecAlreadyFetched(t *testing.T) {
240240
ctx := context.Background()
241241
ctx, cancel := context.WithCancel(ctx)
242242
defer cancel()
243-
tektonclient := fake.NewSimpleClientset(simplePipeline(), dummyPipeline)
243+
tektonclient := fake.NewSimpleClientset(simplePipeline(), samplePipeline)
244244
kubeclient := fakek8s.NewSimpleClientset(&corev1.ServiceAccount{
245245
ObjectMeta: metav1.ObjectMeta{
246246
Namespace: "default",

0 commit comments

Comments
 (0)