]> Nishi Git Mirror - gwion.git/commitdiff
:wrench: Add command to skip benchmark 212/head
authorSenorGrande <clooneyjh@gmail.com>
Mon, 12 Oct 2020 08:42:15 +0000 (21:42 +1300)
committerSenorGrande <clooneyjh@gmail.com>
Mon, 12 Oct 2020 08:42:15 +0000 (21:42 +1300)
Command will exit CI if 'skip ci' exists in the commit message.
This is detailed in Issue #209

.github/workflows/benchmarks.yml

index e2f2fb30b9871ac48be46a871120a93146fd0f0c..06e7d9256a911b491e8736f88eeea8730c30f2e2 100644 (file)
@@ -20,5 +20,6 @@ jobs:
         ORG: fennecdjay
         REPO: gwion-benchmark
       run: |
+        [ ! -z "$(git log -n1 --oneline --grep='skip ci')" ] && exit 0
         echo "{\"event_type\": \"${EVENT}\", \"client_payload\": {\"commit_info\":\"$(git log -n1 --date=format:'%D %H:%M:%S' --format='> Author: %an Date: %cd  Commit: %h')\"}}" > commit_info
         curl -d "@commit_info" -H "Content-Type: application/json" -H "Authorization: token ${{ secrets.BENCHMARK_TOKEN }}" -H "Accept: application/vnd.github.everest-preview+json" "https://api.github.com/repos/${ORG}/${REPO}/dispatches"