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

Trigger build workflows based on changed files #3439

Open
sven-dmlr opened this issue Sep 19, 2024 · 0 comments · May be fixed by #3440
Open

Trigger build workflows based on changed files #3439

sven-dmlr opened this issue Sep 19, 2024 · 0 comments · May be fixed by #3440
Assignees
Labels
build github_actions Pull requests that update GitHub Actions code java

Comments

@sven-dmlr
Copy link
Member

sven-dmlr commented Sep 19, 2024

Situation

Currently the workflows

  • "Java & Go CI" (build Java + Go and run integration tests)
  • "Build SecHub GHA (scan)" (build scan Action and run its unit tests)
    are not working properly (commits to master, develop, ... never trigger a run but they should)

Additionally both workflows are started even if they aren't suppoed to run (skipped by if: statement.
This looks a bit confusing.

Wanted

The build workflows are triggered based on the change's (Pr or commit) content.

Solution

Use paths: and paths-ignore
instead of branches plus if:.

See https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#onpushpull_requestpull_request_targetpathspaths-ignore

Also the docs can be updated: There is no more need for gha_feature-xyz branch names.

@sven-dmlr sven-dmlr added build java github_actions Pull requests that update GitHub Actions code labels Sep 19, 2024
@sven-dmlr sven-dmlr self-assigned this Sep 19, 2024
@mercedes-benz mercedes-benz deleted a comment Sep 19, 2024
sven-dmlr added a commit that referenced this issue Sep 19, 2024
sven-dmlr added a commit that referenced this issue Sep 19, 2024
sven-dmlr added a commit that referenced this issue Sep 19, 2024
sven-dmlr added a commit that referenced this issue Sep 19, 2024
sven-dmlr added a commit that referenced this issue Sep 20, 2024
"tag-ignore" in the on: section does not work.
So placed in the job
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build github_actions Pull requests that update GitHub Actions code java
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant