Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 15 additions & 3 deletions .github/workflows/update-submodule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ on:
types: [submodule-updated]
workflow_dispatch:

permissions:
contents: write
pull-requests: write

concurrency:
group: update-submodule
cancel-in-progress: true
Expand All @@ -25,7 +29,7 @@ jobs:
run: |
cd plugins/temporal-developer/skills/temporal-developer
git fetch origin dev
git checkout origin/dev
git checkout FETCH_HEAD
cd "$GITHUB_WORKSPACE"

- name: Check for changes
Expand All @@ -37,11 +41,19 @@ jobs:
echo "changed=true" >> "$GITHUB_OUTPUT"
fi

- name: Commit and push
- name: Create PR and merge
if: steps.check.outputs.changed == 'true'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
branch="auto/update-submodule-$(date +%s)"
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git checkout -b "$branch"
git add plugins/temporal-developer/skills/temporal-developer
git commit -m "update submodule to latest dev"
git push origin dev
git push origin "$branch"
pr_url=$(gh pr create --base dev --head "$branch" \
--title "update submodule to latest dev" \
--body "Automated submodule pointer update.")
gh pr merge "$pr_url" --squash --auto --delete-branch
Loading