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

split workflow.yml #23

Merged
merged 1 commit into from
Mar 22, 2024
Merged

Conversation

MatousJobanek
Copy link
Contributor

split the workflow.yml file into

  • test-with-coverage.yml
  • linters.yml

The main reason is that with the new configuration: pull_request_target the workflow automatically checks out the code from master and not from PR. To make it work, we need to use:

    - name: Checkout code
      uses: actions/checkout@v4
      with:
        ref: ${{github.event.pull_request.head.ref}}
        repository: ${{github.event.pull_request.head.repo.full_name}}

however, this is needed only for the tests, not for linters.

Copy link
Contributor

@xcoulon xcoulon left a comment

Choose a reason for hiding this comment

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

we could also keep a single workflow and do the same checkout with the ref, couldn't we?

@MatousJobanek
Copy link
Contributor Author

we could, but sometimes I get lost in the generic workflows that contain just too many actions and steps

@MatousJobanek MatousJobanek merged commit 2b38309 into kubesaw:master Mar 22, 2024
5 of 6 checks passed
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.

2 participants