ci: skip GitHub workflow runs for already-tested commits/trees
commit7d78d5fc1a91b683dde970e5e48b6d9a873cfd99
authorJohannes Schindelin <johannes.schindelin@gmx.de>
Thu, 8 Oct 2020 15:29:34 +0000 (8 15:29 +0000)
committerJunio C Hamano <gitster@pobox.com>
Thu, 8 Oct 2020 18:58:37 +0000 (8 11:58 -0700)
tree2caae41cbec5b94319cbb32573100a06e1ad1cf2
parentd98273ba77e1ab9ec755576bc86c716a97bf59d7
ci: skip GitHub workflow runs for already-tested commits/trees

When pushing a commit that has already passed a CI or PR build
successfully, it makes sense to save some energy and time and skip the
new build.

Let's teach our GitHub workflow to do that.

For good measure, we also compare the tree ID, which is what we actually
test (the commit ID might have changed due to a reworded commit message,
which should not affect the outcome of the run).

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
.github/workflows/main.yml