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

Resolves sigstore/community#121 #1060

Closed
wants to merge 1 commit into from
Closed

Resolves sigstore/community#121 #1060

wants to merge 1 commit into from

Conversation

n3k0m4
Copy link

@n3k0m4 n3k0m4 commented Sep 20, 2022

Signed-off-by: n3k0m4 senpaineko1@gmail.com

Summary

This PR solves the Sigstore community issue #121 for Rekor.

To summarize the issue, all the Sigstore projects were running multiple workflows (unit & e2e tests, builds, ...) even when the changes were unimportant (.txt, .md, ...). This causes unnecessary use of resources.

The solution implemented in this PR is adding paths matching for the files that can trigger the execution of workflows.

Testing:

There are potentially two ways to test these changes:
Forking the repository and executing the steps below, or making a new branch in the current repo and adding the branch name in branches: inside the modified workflows, then executing the steps below.

  1. Pull the changes
  2. Modify .md, .txt or another file in paths like images
  3. Commit the changes

Results: No actions should run.

Changes doc:

You can find the changes doc for this story here.

Release Note

Documentation

Signed-off-by: n3k0m4 <senpaineko1@gmail.com>
@n3k0m4
Copy link
Author

n3k0m4 commented Sep 20, 2022

cc @cpanato

Copy link
Member

@cpanato cpanato left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some comments thanks for working on this

pull_request:
# The branches below must be a subset of the branches above
branches: [ main ]
paths:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is not good because this job is required and then this will never run or skipped and will be pending in the github status

I think for everything we should use the dorny/paths-filter

      - uses: dorny/paths-filter@v2
        id: filter
        with:
          filters: |
            terraform:
              - 'tests/**'

we will need to check if the syntax - '!images/**' works with this

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you explain more the first part: "will never run or skipped" ?

Also, dorny/paths-filter seems to handle the syntax !images/** in another way:

  • Define the filters (paths that can trigger the job or a step in a workflow).
  • Use if statement to choose if you want to trigger the job or not, based on the existence of the file or not.

@haydentherapper
Copy link
Contributor

Hi, any interest in finishing this up? Otherwise let's close the PR

@cpanato
Copy link
Member

cpanato commented Mar 17, 2023

lets close this PR for now, I think we did other changes in ci in the meantime

closing due to inactivity
if you are still interested please open a new PR, thanks for your contribution

@cpanato cpanato closed this Mar 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants