File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change 12
12
13
13
permissions :
14
14
contents : write
15
- pull-requests : write
16
15
17
16
jobs :
18
17
update :
@@ -45,14 +44,16 @@ jobs:
45
44
run : npm update "$PKG" --lock-file-only
46
45
env :
47
46
PKG : ${{ inputs.package }}
48
- - name : Commit and push changes
47
+ - name : Commit changes
48
+ id : commit
49
49
run : |
50
50
set -euo pipefail
51
+ echo commit=n > $GITHUB_OUTPUT
51
52
if git add package.json package-lock.json; then
52
53
git config --global user.name "$ACTOR (on behalf of $TRIGGERING_ACTOR)"
53
54
git config --global user.email "[email protected] "
54
55
git commit --message "Update $PKG to $VERSION"
55
- git push --force
56
+ echo commit=y > $GITHUB_OUTPUT
56
57
else
57
58
echo '::warning::No changes detected. Skipping push.'
58
59
fi
61
62
VERSION : ${{ steps.view.outputs.version }}
62
63
ACTOR : ${{ github.actor }}
63
64
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 }}
You can’t perform that action at this time.
0 commit comments