Skip to content

Commit 1497f57

Browse files
authored
[WEDO-7266] Auto bump improvements (#2819)
1 parent 6a14efe commit 1497f57

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

.github/workflows/docs-auto-bump.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,12 @@ jobs:
3131
- name: Determine version to install
3232
id: get_version
3333
env:
34-
NPM_CONFIG_USERCONFIG: ${{ github.workspace }}/.npmrc
35-
NODE_AUTH_TOKEN: ${{ secrets.REPO_ACCESS_TOKEN }}
34+
GH_TOKEN: ${{ secrets.REPO_ACCESS_TOKEN }}
3635
run: |
3736
VERSION="${{ github.event.inputs.target_version }}"
3837
if [ -z "$VERSION" ]; then
3938
echo "No target_version provided. Finding the latest version..."
40-
LATEST_VERSION=$(npm view @arduino/docs.arduino.cc version)
39+
LATEST_VERSION=$(curl -s -H "Authorization: token $GH_TOKEN" -H "Accept: application/vnd.github.v3+json" https://api.github.com/orgs/arduino/packages/npm/docs-arduino-cc/versions | jq -r '.[0].name')
4140
echo "Latest version is $LATEST_VERSION"
4241
echo "version=$LATEST_VERSION" >> "$GITHUB_OUTPUT"
4342
else
@@ -51,8 +50,8 @@ jobs:
5150
run: |
5251
find . -name "package.json" -exec sed -i 's/@arduino\/docs-arduino-cc": "^.*"/@arduino\/docs-arduino-cc": "^'${VERSION}'"/' {} \;
5352
54-
- name: Install dependencies with pnpm
55-
run: npm install
53+
- name: Install dependencies
54+
run: npm install --ignore-scripts
5655

5756
- name: Create Pull Request
5857
uses: peter-evans/create-pull-request@v6

0 commit comments

Comments
 (0)