Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use a maintained action for "changed files" #7364

Merged
merged 1 commit into from
Nov 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 11 additions & 7 deletions .github/workflows/woke.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,20 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: 'Checkout'
uses: actions/checkout@v2

- uses: jitterbit/get-changed-files@v1
id: files
uses: actions/checkout@v4

- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v40
with:
write_output_files: true
files: |
**

- name: 'woke'
if: steps.changed-files.outputs.any_changed == 'true'
uses: get-woke/woke-action@v0
with:
# Cause the check to fail on any broke rules
fail-on-error: true
# See https://github.com/marketplace/actions/get-all-changed-files
# for more options
woke-args: ${{ steps.files.outputs.added_modified }}
woke-args: ${{ steps.changed_files.outputs.all_changed_files }}
2 changes: 2 additions & 0 deletions .wokeignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
go.mod
go.sum
vendor
config/dummy.go
.wokeignore
4 changes: 2 additions & 2 deletions pkg/apis/pipeline/v1beta1/resource_types_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ import (
var (
prependStep = v1beta1.Step{
Name: "prepend-step",
Image: "dummy",
Image: "sample",
Command: []string{"doit"},
Args: []string{"stuff", "things"},
}
appendStep = v1beta1.Step{
Name: "append-step",
Image: "dummy",
Image: "sample",
Command: []string{"doit"},
Args: []string{"other stuff", "other things"},
}
Expand Down
12 changes: 6 additions & 6 deletions pkg/reconciler/pipelinerun/resources/pipelineref_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ import (
)

var (
dummyPipeline = &v1.Pipeline{
samplePipeline = &v1.Pipeline{
ObjectMeta: metav1.ObjectMeta{
Name: "dummy",
Name: "sample",
Namespace: "default",
},
TypeMeta: metav1.TypeMeta{
Expand Down Expand Up @@ -130,7 +130,7 @@ func TestLocalPipelineRef(t *testing.T) {
}{
{
name: "local-pipeline",
pipelines: []runtime.Object{simplePipeline(), dummyPipeline},
pipelines: []runtime.Object{simplePipeline(), samplePipeline},
ref: &v1.PipelineRef{
Name: "simple",
},
Expand Down Expand Up @@ -191,9 +191,9 @@ func TestGetPipelineFunc_Local(t *testing.T) {
name: "local-pipeline",
localPipelines: []runtime.Object{
simplePipelineWithBaseSpec(),
dummyPipeline,
samplePipeline,
},
remotePipelines: []runtime.Object{simplePipeline(), dummyPipeline},
remotePipelines: []runtime.Object{simplePipeline(), samplePipeline},
ref: &v1.PipelineRef{
Name: "simple",
},
Expand Down Expand Up @@ -240,7 +240,7 @@ func TestGetPipelineFuncSpecAlreadyFetched(t *testing.T) {
ctx := context.Background()
ctx, cancel := context.WithCancel(ctx)
defer cancel()
tektonclient := fake.NewSimpleClientset(simplePipeline(), dummyPipeline)
tektonclient := fake.NewSimpleClientset(simplePipeline(), samplePipeline)
kubeclient := fakek8s.NewSimpleClientset(&corev1.ServiceAccount{
ObjectMeta: metav1.ObjectMeta{
Namespace: "default",
Expand Down
Loading
Loading