1616
1717 steps :
1818 - name : Check actor permission
19- uses : skjnldsv/check-actor-permission@v3
19+ uses : skjnldsv/check-actor-permission@69e92a3c4711150929bca9fcf34448c5bf5526e7 # v3
2020 with :
2121 require : admin
2222
@@ -52,12 +52,11 @@ jobs:
5252
5353 env :
5454 NODE_VERSION : " ^22.0.0"
55- NPM_VERSION : " ^10.0.0"
56- BRANCH_NAME : " feat/package-node-npm-engines-update"
55+ NPM_VERSION : " ^10.5.0" # node 22.0.0 was shipped with 10.5.1 we should not use older NPM with Node 22
5756
5857 steps :
5958 - name : Checkout target repository
60- uses : actions/checkout@v4
59+ uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
6160 with :
6261 token : ${{ secrets.COMMAND_BOT_PAT }}
6362 repository : ${{ github.repository_owner }}/${{ matrix.repositories }}
6867 with :
6968 files : package.json
7069
71- - name : Keeping default branch
72- id : extract_base
73- if : steps.check_file_existence.outputs.files_exists == 'true'
74- run : echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
75-
76- - name : Check out new branch
77- if : steps.check_file_existence.outputs.files_exists == 'true'
78- run : git checkout -b ${{ env.BRANCH_NAME }}
79-
8070 - name : Set node version to ${{ env.NODE_VERSION }}
8171 if : steps.check_file_existence.outputs.files_exists == 'true'
8272 run : jq '.engines.node = "${{ env.NODE_VERSION }}"' package.json > package-new.json && mv package-new.json package.json
@@ -85,28 +75,19 @@ jobs:
8575 if : steps.check_file_existence.outputs.files_exists == 'true'
8676 run : jq '.engines.npm = "${{ env.NPM_VERSION }}"' package.json > package-new.json && mv package-new.json package.json
8777
88- - name : Setup git
89- if : steps.check_file_existence.outputs.files_exists == 'true'
90- run : |
91- git config --local user.email "nextcloud-command@users.noreply.github.com"
92- git config --local user.name "nextcloud-command"
93-
94- - name : Commit and force push
95- run : |
96- git add .
97- git commit --signoff -m 'Update npm and node engines versions'
98- git push --force origin ${{ env.BRANCH_NAME }}
99-
10078 - name : Create Pull Request
10179 id : create_pull_request
10280 if : steps.check_file_existence.outputs.files_exists == 'true'
103- uses : peter-evans/create-pull-request@v7
81+ uses : peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7.0.8
10482 with :
105- body : Automated update of the npm and node engines versions
106- base : ${{ steps.extract_base.outputs.branch }}
107- branch : ${{ env.BRANCH_NAME }}
10883 author : Nextcloud bot <bot@nextcloud.com>
109- title : Update npm and node engines versions
84+ committer : nextcloud-command <nextcloud-command@users.noreply.github.com>
85+ title : ' build: update node and npm engines versions'
86+ body : Automated update of the npm and node engines versions according to ...
87+ commit-message : |
88+ build: update node and npm engines versions
89+ signoff : true
90+ branch : ' feat/package-node-npm-engines-update'
11091 labels : dependencies
11192 token : ${{ secrets.COMMAND_BOT_PAT }}
11293
0 commit comments