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

[trivial] Prevent build.yml workflow to trigger on tags push #90

Merged
merged 1 commit into from
Nov 10, 2021

Conversation

nhuet
Copy link
Contributor

@nhuet nhuet commented Oct 28, 2021

As this trigger is already handled by release.yml for release tags.

@nhuet nhuet changed the title [Trivial] Prevent build.yml workflow to trigger on tags push [trivial] Prevent build.yml workflow to trigger on tags push Oct 28, 2021
Copy link
Contributor

@dbarbier dbarbier left a comment

Choose a reason for hiding this comment

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

LGTM. Out of curiosity, did you check that this works as expected on your repo?

@nhuet nhuet force-pushed the nh/prevent-build.yml-for-tags branch from 8b95799 to 0057d9a Compare November 2, 2021 08:29
@nhuet
Copy link
Contributor Author

nhuet commented Nov 2, 2021

I switched to tags-ignore = "*". Both solutions (the latter and branchs = "*") worked but the new version (pointed out to me by @dbarbier) is more explicit.
You can see that build.yml is no more trigger for this tag on my repo: tag-to-test-no-build.

@nhuet nhuet force-pushed the nh/prevent-build.yml-for-tags branch from 0057d9a to cf89939 Compare November 2, 2021 10:40
@nhuet
Copy link
Contributor Author

nhuet commented Nov 2, 2021

Actually i will revert to previous version as

on:
  push:
    tags-ignore: 
      - "*"

actually prevent triggering on tags but also on branches (this is odd i know), though still working for PR
whereas

on:
  push:
    branches: 
      - "*"

work as we want: triggering on all branches push but not on tags push (but still on PR).

@nhuet nhuet force-pushed the nh/prevent-build.yml-for-tags branch from a4a79dd to 0ed7a0f Compare November 2, 2021 11:10
@nhuet
Copy link
Contributor Author

nhuet commented Nov 2, 2021

I do not know why but my branch nh/prevent-build.yml-for-tags actually does not trigger any action on my repo whereas:

  • it works for PR as we can see here
  • another branch "test" at the same commit does trigger build.yml (as it was expected): https://github.com/nhuet/scikit-decide/actions/runs/1411982289
  • i suspected a problem with the branch name with the dot in it, but yet another branch with a simpler name nh/prevent-build-for-tags pointing also at the same commit does not trigger build.yml either.

Very strange... 🤔

(This is already handled by release.yml for release tags)

NB: We use here `branches = "*"` condition instead of `tags-ignore = "*"`
because the latter prevent also build.yml to trigger on commit push on
regular branches (oddly enough)
@nhuet nhuet force-pushed the nh/prevent-build.yml-for-tags branch from 0ed7a0f to 72ffae2 Compare November 2, 2021 15:08
@galleon galleon merged commit bb92c5a into airbus:master Nov 10, 2021
@nhuet nhuet deleted the nh/prevent-build.yml-for-tags branch November 26, 2021 08:59
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.

3 participants