]> Nishi Git Mirror - gwion.git/commitdiff
:art: Trigger gwion-fmt build
authorJérémie Astor <fennecdjay@gmail.com>
Mon, 1 Feb 2021 02:22:40 +0000 (03:22 +0100)
committerJérémie Astor <fennecdjay@gmail.com>
Mon, 1 Feb 2021 02:22:40 +0000 (03:22 +0100)
.github/workflows/fmt.yml [new file with mode: 0644]

diff --git a/.github/workflows/fmt.yml b/.github/workflows/fmt.yml
new file mode 100644 (file)
index 0000000..3b13e33
--- /dev/null
@@ -0,0 +1,25 @@
+name: 'trigger Formatter'
+on:
+  workflow_run:
+    workflows: ["Linux Release"]
+    types:
+      - completed
+
+jobs:
+  post-test-success:
+    runs-on: ubuntu-latest
+    steps:
+
+    - uses: actions/checkout@v2
+
+    - name: call the other repo
+      if: github.ref == 'refs/heads/master'
+      env:
+        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+        EVENT: benchmark-event
+        ORG: Gwion
+        REPO: gwion-fmt
+      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"