Skip to content

Commit 45665cd

Browse files
authored
Update package-update.yml
1 parent f1396dd commit 45665cd

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

.github/workflows/package-update.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ on:
1212

1313
permissions:
1414
contents: write
15-
pull-requests: write
1615

1716
jobs:
1817
update:
@@ -45,14 +44,16 @@ jobs:
4544
run: npm update "$PKG" --lock-file-only
4645
env:
4746
PKG: ${{ inputs.package }}
48-
- name: Commit and push changes
47+
- name: Commit changes
48+
id: commit
4949
run: |
5050
set -euo pipefail
51+
echo commit=n > $GITHUB_OUTPUT
5152
if git add package.json package-lock.json; then
5253
git config --global user.name "$ACTOR (on behalf of $TRIGGERING_ACTOR)"
5354
git config --global user.email "[email protected]"
5455
git commit --message "Update $PKG to $VERSION"
55-
git push --force
56+
echo commit=y > $GITHUB_OUTPUT
5657
else
5758
echo '::warning::No changes detected. Skipping push.'
5859
fi
@@ -61,4 +62,7 @@ jobs:
6162
VERSION: ${{ steps.view.outputs.version }}
6263
ACTOR: ${{ github.actor }}
6364
TRIGGERING_ACTOR: ${{ github.triggering_actor }}
64-
GH_TOKEN: ${{ github.token }}
65+
- name: Push to branch
66+
uses: MithrilJS/push-protected@main
67+
with:
68+
token: ${{ secrets.PACKAGE_UPDATE_TOKEN }}

0 commit comments

Comments
 (0)