Skip to content

Commit 87280eb

Browse files
authored
Synchronize templates through PRs, instead of pushes (#5291)
Despite what we had in the [original request](#3155 (comment)), I'm proposing a change to open a PR to the destination template repositories instead of pushing the code. This will give it a chance to run through the destination CI before making changes, and to set stricter branch protection in the destination repos.
1 parent 2993b00 commit 87280eb

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

.github/workflows/misc-sync-templates.yml

+10-6
Original file line numberDiff line numberDiff line change
@@ -166,9 +166,13 @@ jobs:
166166
title: "[Don't merge] Update the ${{ matrix.template }} template to ${{ github.event.inputs.stable_release_branch }}"
167167
body: "The template has NOT been successfully built and needs to be inspected."
168168
branch: "update-template/${{ github.event.inputs.stable_release_branch }}"
169-
- name: Push changes
170-
run: |
171-
git add -A .
172-
git commit --allow-empty -m "Update to ${{ github.event.inputs.stable_release_branch }} triggered by ${{ github.event_name }}"
173-
git push
174-
working-directory: "${{ env.template-path }}"
169+
- name: Create PR on success
170+
uses: peter-evans/create-pull-request@c5a7806660adbe173f04e3e038b0ccdcd758773c # v5
171+
with:
172+
path: "${{ env.template-path }}"
173+
token: ${{ steps.app_token.outputs.token }}
174+
add-paths: |
175+
./*
176+
title: "Update the ${{ matrix.template }} template to ${{ github.event.inputs.stable_release_branch }}"
177+
body: "This synchronizes the template to the ${{ github.event.inputs.stable_release_branch }} branch."
178+
branch: "update-template/${{ github.event.inputs.stable_release_branch }}"

0 commit comments

Comments
 (0)