Skip to content

Commit 5466997

Browse files
internal: Adds condition to workflow_dispatch for patching workflow
1 parent 5103797 commit 5466997

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

.github/workflows/patch-speakeasy-pr.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99

1010
jobs:
1111
add-extend-path:
12-
if: contains(github.event.pull_request.title, 'Update SDK - Generate')
12+
if: github.event_name == 'workflow_dispatch' || (github.event_name == 'pull_request' && contains(github.event.pull_request.title, 'Update SDK - Generate'))
1313
runs-on: ubuntu-latest
1414
permissions:
1515
contents: write
@@ -18,7 +18,7 @@ jobs:
1818
steps:
1919
- uses: actions/checkout@v4
2020
with:
21-
ref: ${{ github.head_ref }}
21+
ref: ${{ github.head_ref || github.ref_name }}
2222
fetch-depth: 0
2323

2424
- name: Patch glean/__init__.py with extend_path
@@ -34,4 +34,4 @@ jobs:
3434
3535
git add src/glean/__init__.py
3636
git commit -m "ci: ensure extend_path lines in glean/__init__.py" || echo "No changes to commit"
37-
git push origin HEAD:${{ github.head_ref }}
37+
git push origin HEAD:${{ github.head_ref || github.ref_name }}

0 commit comments

Comments
 (0)