Skip to content
This repository has been archived by the owner on Jul 2, 2024. It is now read-only.

Commit

Permalink
fix(test11): test upgrade node version
Browse files Browse the repository at this point in the history
  • Loading branch information
florian-sanders-cc committed Apr 6, 2024
1 parent 2047c39 commit 342a3e2
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
14 changes: 8 additions & 6 deletions .github/workflows/nix-flake-update-node-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
# paths:
# - 'package.json'
jobs:
get-node-version:
get-major-node-version:
runs-on: ubuntu-latest
outputs:
NODE_VERSION: ${{ steps.output_node_version.outputs.NODE_VERSION }}
Expand All @@ -21,15 +21,17 @@ jobs:
} >> $GITHUB_OUTPUT
- id: extract_node_version
run: echo "NODE_VERSION=${{ fromJSON(steps.get_package_json_content.outputs.PACKAGE_JSON_CONTENT).volta.node }}" >> $GITHUB_OUTPUT
- name: get major node version
id: get_major_node_version
run: echo "MAJOR_NODE_VERSION=$(echo ${{ steps.extract_node_version.outputs.NODE_VERSION }} | sed 's/\..\+//g')" >> $GITHUB_OUTPUT
- name: extract major node version
id: extract_major_node_version
run: |
echo ${{ steps.extract_node_version.outputs.NODE_VERSION }}
echo "MAJOR_NODE_VERSION=$(echo ${{ steps.extract_node_version.outputs.NODE_VERSION }} | sed 's/\..\+//g')" >> $GITHUB_OUTPUT
update-nix-flake-node-version:
runs-on: ubuntu-latest
needs: get-node-version
needs: get-major-node-version
steps:
- uses: actions/checkout@v4
- name: replace nix flake node version
run: sed -i "s/(?<=nodejs = )nodejs.\+;/nodejs-${{ steps.get_major_node_version.outputs.MAJOR_NODE_VERSION }}_x;/" flake.nix
run: sed -r -i "s/(nodejs-.._x)/nodejs-${{ needs.get_major_node_version.outputs.MAJOR_NODE_VERSION }}_x/gm" flake.nix
- name: run git status
run: git status
2 changes: 0 additions & 2 deletions .github/workflows/update-flake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ on:
jobs:
update-nix-flake:
runs-on: ubuntu-latest
outputs:
NPM_DEPS_HASH: ${{ steps.prefetch.outputs.NPM_DEPS_HASH }}
steps:
- uses: actions/checkout@v4
with:
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,6 @@
]
},
"volta": {
"node": "18.15.4"
"node": "19.15.4"
}
}

0 comments on commit 342a3e2

Please sign in to comment.