Jelajahi Sumber

ci: automatically open PRs to update public API

This is annoying and I'd like to stop doing it.
Tamir Duberstein 3 bulan lalu
induk
melakukan
08becfdfa8
1 mengubah file dengan 10 tambahan dan 2 penghapusan
  1. 10 2
      .github/workflows/ci.yml

+ 10 - 2
.github/workflows/ci.yml

@@ -48,8 +48,16 @@ jobs:
       - name: Run clippy
         run: cargo hack clippy --all-targets --feature-powerset --workspace -- --deny warnings
 
-      - name: Check public API
-        run: cargo xtask public-api
+      - run: cargo xtask public-api
+        if: github.event_name == 'pull_request'
+
+      - run: cargo xtask public-api --bless
+        if: github.event_name != 'pull_request' && github.repository_owner == 'aya-rs'
+
+      - uses: peter-evans/create-pull-request@v7
+        if: github.event_name != 'pull_request' && github.repository_owner == 'aya-rs'
+        with:
+          commit-message: "public-api: regenerate"
 
       - name: Run miri
         run: |