Skip to content

Commit de6c169

Browse files
Merge pull request #26 from temporalio/donald/dev-updating-main
GH action to update submodule
2 parents 3713bcd + db7cfc5 commit de6c169

1 file changed

Lines changed: 47 additions & 0 deletions

File tree

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Update submodule pointer
2+
3+
on:
4+
repository_dispatch:
5+
types: [submodule-updated]
6+
workflow_dispatch:
7+
8+
concurrency:
9+
group: update-submodule
10+
cancel-in-progress: true
11+
12+
jobs:
13+
update-submodule:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout dev branch
17+
uses: actions/checkout@v4
18+
with:
19+
ref: dev
20+
submodules: true
21+
# Use default GITHUB_TOKEN — has push access to the repo
22+
token: ${{ secrets.GITHUB_TOKEN }}
23+
24+
- name: Update submodule to latest dev
25+
run: |
26+
cd plugins/temporal-developer/skills/temporal-developer
27+
git fetch origin dev
28+
git checkout origin/dev
29+
cd "$GITHUB_WORKSPACE"
30+
31+
- name: Check for changes
32+
id: check
33+
run: |
34+
if git diff --quiet; then
35+
echo "changed=false" >> "$GITHUB_OUTPUT"
36+
else
37+
echo "changed=true" >> "$GITHUB_OUTPUT"
38+
fi
39+
40+
- name: Commit and push
41+
if: steps.check.outputs.changed == 'true'
42+
run: |
43+
git config user.name "github-actions[bot]"
44+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
45+
git add plugins/temporal-developer/skills/temporal-developer
46+
git commit -m "update submodule to latest dev"
47+
git push origin dev

0 commit comments

Comments
 (0)