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 e1a3f03
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 10 deletions.
20 changes: 13 additions & 7 deletions .github/workflows/nix-flake-update-node-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ 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 }}
# nodeVersion: ${{ steps.extract_major_node_version.outputs.MAJOR_NODE_VERSION }}
steps:
- uses: actions/checkout@v4
- id: get_package_json_content
Expand All @@ -21,15 +21,21 @@ 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 "MAJOR_NODE_VERSION=$(echo ${{ steps.extract_node_version.outputs.NODE_VERSION }} | sed 's/\..\+//g')" >> $GITHUB_OUTPUT
- name: check
run: echo ${{ steps.extract_major_node_version.outputs.MAJOR_NODE_VERSION }}
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: |
echo ${{ needs.get_major_node_version.outputs.handle }}
echo ${{ needs.get_major_node_version.outputs.nodeVersion }}
sed -r -i "s/(nodejs-.._x)/nodejs-${{ needs.get-major-node-version.outputs.nodeVersion }}_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 e1a3f03

Please sign in to comment.