Skip to content

Commit

Permalink
ci: add regenerate workflow to CI
Browse files Browse the repository at this point in the history
  • Loading branch information
pmalek committed Aug 22, 2024
1 parent 7cf0aee commit 0d43466
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
name: Generate SDK

on:
pull_request:
paths:
- .speakeasy/gen.yaml
types:
- opened
- synchronize
- reopened
workflow_dispatch:

jobs:
generate:
Expand Down
26 changes: 26 additions & 0 deletions .github/workflows/generate_on_label.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Generate SDK

on:
pull_request:
branches:
- '*'
types:
- labeled

jobs:
check-label:
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- uses: mheap/github-action-required-labels@v5
with:
mode: exactly
count: 1
labels: "regenerate"

generate:
needs:
- check-label
uses: ./.github/workflows/__generate.yaml
14 changes: 14 additions & 0 deletions .github/workflows/generate_on_pr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Generate SDK

on:
pull_request:
paths:
- .speakeasy/gen.yaml
types:
- opened
- synchronize

jobs:
build:
uses: ./.github/workflows/__generate.yaml

0 comments on commit 0d43466

Please sign in to comment.