Skip to content

Commit

Permalink
[generate bindings]
Browse files Browse the repository at this point in the history
  • Loading branch information
CGMossa committed Nov 16, 2023
1 parent dda5ab6 commit c397612
Showing 1 changed file with 20 additions and 6 deletions.
26 changes: 20 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -234,22 +234,36 @@ jobs:
# env:
# RUST_TARGET: ${{ matrix.config.target }}

check_generate_bindings_flag:
name: Check if [generate bindings] is in latest commit message
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ env.GITHUB_SHA }}
- name: Get Head Commit Message
id: get_head_commit_message
run: echo "HEAD_COMMIT_MESSAGE=$(git show -s --format=%s)" >> "$GITHUB_ENV"

is_generated_binding_commit:
name: Debug
runs-on: ubuntu-latest
needs: check_generate_bindings_flag
steps:
- run: echo ${{ github.event.head_commit.message }}
- run: echo ${{ contains(github.event.head_commit.message, '[generate bindings]') }}
- run: echo ${{ $HEAD_COMMIT_MESSAGE }}
- run: echo ${{ contains($HEAD_COMMIT_MESSAGE, '[generate bindings]') }}

pr_generated_bindings:
name: Make PR with generated bindings
# needs: test_with_bindgen
if: ${{ contains(github.event.head_commit.message, '[generate bindings]') }}
needs: [test_with_bindgen, check_generate_bindings_flag]
if: ${{ contains($HEAD_COMMIT_MESSAGE, '[generate bindings]') }}
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

with:
ref: ${{ env.GITHUB_SHA }}

- uses: actions/download-artifact@v3

- name: Create branch
Expand Down

0 comments on commit c397612

Please sign in to comment.