abiosoft / abiosoft/caddy-git

Pulling `{latest}` via WebHook

未關閉
#97 4 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
Go
星號
206
分支
42
PR 合併指標
30 天內沒有已合併 PR

描述

```
# caddy -version
Caddy 0.11.1 (non-commercial use only)
```

Considering the following `Caddyfile`:

```
http://www.example.com {
root /web/www.example.com/public
git https://github.com/example/example.com {
hook /path TOKEN
branch {latest}
path ..
then /hugo --destination=/web/www.example.com/public --cleanDestinationDir
}
}

http://beta.example.com {
root /web/beta.example.com/public
git https://github.com/example/example.com {
hook /path TOKEN
branch master
path ..
then /hugo --destination=/web/beta.example.com/public --cleanDestinationDir
}
}

```
The expected behaviour is:
* On a `commit`/`push` to the repo beta.example.com will be updated.
* On a `commit`/`push` to the repo www.example.com will NOT be updated. (Caddy log: `2018/12/06 12:00:55 github webhook ignored. Error: found different branch master`).
* On a `tag`/`push --tags` to the repo beta.example.com will be updated with no effect
* On a `tag`/`push --tags` to the repo www.example.com will be updated to latest version.

Effective behaviour is:
* `commit`/`push` works as expected.
* `tag`/`push --tags` gives the following error for BOTH instances (www/beta):
`2018/12/06 12:02:44 github webhook ignored. Error: found different branch v1.0.4` where v1.0.4 is the latest tag.

A restart of Caddy results in the expected behaviour.

Is this a bug or is my understanding of the plugin wrong?

貢獻指南

這個儲存庫沒有索引到貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。