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

Allow GitHub Actions workflow trigger for pull requests #127

Open
dhs3000 opened this issue May 17, 2022 · 4 comments
Open

Allow GitHub Actions workflow trigger for pull requests #127

dhs3000 opened this issue May 17, 2022 · 4 comments
Labels
area: release enhancement New feature or request

Comments

@dhs3000
Copy link
Contributor

dhs3000 commented May 17, 2022

We have some halfpipe manifests that are used to create GH Action workflows to execute tests against a pull request.

Currently, halfpipe only supports the push event to trigger a run. For our use case, we need to manually change the generated workflow to use pull_request event.

It would be great if this could be somehow supported in halfpipe directly, as it makes it much easier to the developers to use only one "configuration language" (halfpipe).

@robwhitby
Copy link
Contributor

yep this is an area we need to think about more, could you link to an example where you use halfpipe for PRs? I'm interested in whether halfpipe makes sense for these kind of simpler/additional workflows or maybe we should be looking more at reusable workflows for standardisation.

@robwhitby robwhitby added enhancement New feature or request area: release labels May 17, 2022
@dhs3000
Copy link
Contributor Author

dhs3000 commented May 17, 2022

There is for example these two examples:

Yes, maybe these reusable workflows could be a good fit. The workflows differ in the watched/ignored paths, injected environment variables/secrets, and the one tasks that is executed (some use docker compose, some directly a docker image&script. The latter could be moved to docker compose I assume, to reduce differences).

@efasel
Copy link
Contributor

efasel commented May 17, 2022

Looks like we would not be able to provide a private shared pool of reusable workflows only accessible from within the SN org. :-\

from Access to reusable workflows — Reusing workflows - GitHub Docs

A reusable workflow can be used by another workflow if either of the following is true:

  • Both workflows are in the same repository.
  • The called workflow is stored in a public repository, and your organization allows you to use public reusable workflows.

On the other hand in Overview — Reusing workflows - GitHub Docs it says:

Your organization can build up a library of reusable workflows that can be centrally maintained.

And in that case this might be a good fit, yes!

I guess we have to try to find out. 🙂

@robwhitby
Copy link
Contributor

robwhitby commented May 18, 2022

luckily internal counts as public in this case, I already have one working:

https://github.com/springernature/ee-github-actions

reusable deploy to snpaas workflow

example repo using it

I think it has good potential, we're just in a spiking phase though, there are some quirks and limitations to learn about

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: release enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants