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

Do not run release job for branch creation events #9

Merged
merged 1 commit into from
May 9, 2020

Conversation

rpanderson
Copy link
Owner

Resolves item 1 in #8.

@rpanderson
Copy link
Owner Author

Merging, as the very creation of this feature branch resulted in the intended workflow of this PR.

@rpanderson rpanderson closed this May 9, 2020
@rpanderson rpanderson reopened this May 9, 2020
@rpanderson rpanderson merged commit 440ceca into master May 9, 2020
@rpanderson rpanderson deleted the workflow_ignore_brach_creation branch May 9, 2020 11:49
@rpanderson rpanderson linked an issue May 9, 2020 that may be closed by this pull request
@chrisjbillington
Copy link
Collaborator

chrisjbillington commented May 22, 2020

Does the exit 1 make the workflow register as failed and send everyone emails?

@rpanderson
Copy link
Owner Author

Does the exit 1 make the workflow register as failed...

Yes, I was testing this way of filtering branch creation events, using the needs: github_properties in the subsequent job of this workflow. I've since removed this and just put it in as a conditional.

... and send everyone emails?

Only if you have notifications configured to do so.

@rpanderson
Copy link
Owner Author

See also my reply to your earlier comment. This conditional is only required because I'm triggering the workflow with:

on:
  push:
    branches:
      - master
      - maintenance/*
  create:
    tags:
      - 'v[0-9]+.[0-9]+.[0-9]+*'

I do this because the attributes for tag creation events are more explicit than push events. See 'Aside' in #8.

The triggering context of GitHub Actions is rather surprising/unexpected, e.g. the above triggers off branch creation events as well. The need for the conditional (now preceding the main job and not resulting in a failure) could be avoided altogether by only triggering off push events, but this requires further assumptions about branch names and reference text.

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.

Unintentional workflow triggers
2 participants