@@ -10,59 +10,11 @@ jobs:
1010 runs-on : ubuntu-latest
1111 steps :
1212 - uses : actions/checkout@v4
13+ - uses : actions/setup-node@v4
1314 with :
14- fetch-depth : 0
15-
16- - name : Get current upstream version
17- id : current
18- run : |
19- VERSION=$(jq -r '.upstreamVersion' dappnode_package.json)
20- echo "version=$VERSION" >> "$GITHUB_OUTPUT"
21-
22- - name : Fetch latest npm version
23- id : upstream
24- run : |
25- LATEST=$(npm view openclaw version)
26- echo "version=$LATEST" >> "$GITHUB_OUTPUT"
27-
28- - name : Check if update is needed
29- id : check
30- run : |
31- if [ "${{ steps.current.outputs.version }}" = "${{ steps.upstream.outputs.version }}" ]; then
32- echo "changed=false" >> "$GITHUB_OUTPUT"
33- else
34- echo "changed=true" >> "$GITHUB_OUTPUT"
35- fi
36-
37- - name : Update upstream version in dappnode_package.json
38- if : steps.check.outputs.changed == 'true'
39- run : |
40- VERSION=${{ steps.upstream.outputs.version }}
41- jq --arg v "$VERSION" '.upstreamVersion = $v' dappnode_package.json > tmp.json && mv tmp.json dappnode_package.json
42-
43- - name : Create PR
44- if : steps.check.outputs.changed == 'true'
15+ node-version : " 22"
16+ - run : npx @dappnode/dappnodesdk github-action bump-upstream
4517 env :
46- GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
47- run : |
48- VERSION=${{ steps.upstream.outputs.version }}
49- BRANCH="bump-upstream/v${VERSION}"
50-
51- git config user.name "github-actions[bot]"
52- git config user.email "github-actions[bot]@users.noreply.github.com"
53-
54- # Check if branch already exists on remote
55- if git ls-remote --heads origin "$BRANCH" | grep -q "$BRANCH"; then
56- echo "Branch $BRANCH already exists, skipping"
57- exit 0
58- fi
59-
60- git checkout -b "$BRANCH"
61- git add dappnode_package.json
62- git commit -m "Bump openclaw upstream to ${VERSION}"
63- git push origin "$BRANCH"
64-
65- gh pr create \
66- --title "Bump openclaw upstream to ${VERSION}" \
67- --body "Bumps openclaw npm package to version \`${VERSION}\`." \
68- --base main
18+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
19+ PINATA_API_KEY : ${{ secrets.PINATA_API_KEY }}
20+ PINATA_SECRET_API_KEY : ${{ secrets.PINATA_SECRET_API_KEY }}
0 commit comments