-
Notifications
You must be signed in to change notification settings - Fork 9
37 lines (31 loc) · 1.16 KB
/
patch-speakeasy-pr.yml
File metadata and controls
37 lines (31 loc) · 1.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: Restructure Speakeasy PR
on:
pull_request:
types: [opened, synchronize]
workflow_dispatch:
jobs:
add-extend-path:
if: github.event_name == 'workflow_dispatch' || (github.event_name == 'pull_request' && contains(github.event.pull_request.title, 'Update SDK - Generate'))
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.head_ref || github.ref_name }}
fetch-depth: 0
- name: Restructure glean package to namespace structure
run: |
python .github/scripts/restructure_to_namespace.py
- name: Commit and push if files changed
run: |
if [ -n "$(git status --porcelain)" ]; then
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git add .
git commit -m "ci: restructure glean package to namespace structure"
git push origin HEAD:${{ github.head_ref || github.ref_name }}
else
echo "No changes detected"
fi