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

Support multiple hooks on the same repository #65

Open
shnhrrsn opened this issue Jul 19, 2017 · 2 comments
Open

Support multiple hooks on the same repository #65

shnhrrsn opened this issue Jul 19, 2017 · 2 comments

Comments

@shnhrrsn
Copy link

shnhrrsn commented Jul 19, 2017

I'm guessing this is a fairly unique request, but I need the ability to support multiple hooks on the same repo -- the difference is the branch.

You can see the full Caddyfile here, but here’s the relevant bits:

git github.com/grindjs/docs {
	hook        /hooks/deploy-docs {$DOCS_SECRET}
	hook_type   github
	branch      master
	key         /apps/.ssh/id_rsa
	path        ../resources/docs/master
	interval    -1
}

git github.com/grindjs/docs {
	hook        /hooks/deploy-docs {$DOCS_SECRET}
	hook_type   github
	branch      0.7
	key         /apps/.ssh/id_rsa
	path        ../resources/docs/0.7
	interval    -1
}

git github.com/grindjs/docs {
	hook        /hooks/deploy-docs {$DOCS_SECRET}
	hook_type   github
	branch      0.6
	key         /apps/.ssh/id_rsa
	path        ../resources/docs/0.6
	interval    -1
}

Basically I have docs for different versions of the framework in branches that can be updated, however when I push to a branch other than master, I get the following:

2017/07/19 02:00:45 github webhook ignored. Error: found different branch 0.7
2017/07/19 02:02:13 github webhook ignored. Error: found different branch 0.6

I'm guessing the plugin is hitting the first match and then abandoning?

@abiosoft
Copy link
Owner

This is accurate

I'm guessing the plugin is hitting the first match and then abandoning?

@region23
Copy link

region23 commented Aug 1, 2018

I have the same issue. I have two branches: master & develop. And I have two sites on the same server (production (master) & develop. And when I push to develop repo I expect that hooked block of code with develop branch. But in Caddy I receive this error:
2018/07/31 00:07:35 gitlab webhook ignored. Error: found different branch develop

Whats wrong?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants