File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1212
1313permissions :
1414 contents : write
15- pull-requests : write
1615
1716jobs :
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 "$ACTOR@users.noreply.github.com"
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
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 }}
You can’t perform that action at this time.
0 commit comments