Skip to content

Commit 5092127

Browse files
committed
chore: choose always the newest pnpm version for the CI run
1 parent 4ee3d69 commit 5092127

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

.github/workflows/frschool-e2e-local.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,16 @@ jobs:
3535
ref: ${{ github.event.client_payload.branch_name }}
3636
token: ${{ github.event.client_payload.github_token }}
3737
path: 'frschool_source_code'
38+
- name: Choose PNPM version
39+
id: pnpm_version
40+
run: |
41+
frs_testing_pnpm_version=$(cat frs_testing/package.json | jq -r ".packageManager" | cut -d "@" -f2);
42+
frschool_source_pnpm_version=$(cat frschool_source_code/package.json | jq -r ".packageManager" | cut -d "@" -f2);
43+
chosen_pnpm_version=$(printf '%s\n' "$frs_testing_pnpm_version" "$frschool_source_pnpm_version" | sort -V | tail -1);
44+
echo "version=$(echo $chosen_pnpm_version)" >> $GITHUB_OUTPUT
3845
- uses: pnpm/action-setup@v2
3946
with:
40-
package_json_file: frs_testing/package.json
47+
version: ${{ steps.pnpm_version.outputs.version }}
4148
- uses: actions/setup-node@v3
4249
with:
4350
cache: 'pnpm'

.github/workflows/frschool-e2e.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,16 @@ jobs:
1717
ref: ${{ github.event.client_payload.branch_name }}
1818
token: ${{ github.event.client_payload.github_token }}
1919
path: 'frschool_source_code'
20+
- name: Choose PNPM version
21+
id: pnpm_version
22+
run: |
23+
frs_testing_pnpm_version=$(cat frs_testing/package.json | jq -r ".packageManager" | cut -d "@" -f2);
24+
frschool_source_pnpm_version=$(cat frschool_source_code/package.json | jq -r ".packageManager" | cut -d "@" -f2);
25+
chosen_pnpm_version=$(printf '%s\n' "$frs_testing_pnpm_version" "$frschool_source_pnpm_version" | sort -V | tail -1);
26+
echo "version=$(echo $chosen_pnpm_version)" >> $GITHUB_OUTPUT
2027
- uses: pnpm/action-setup@v2
2128
with:
22-
package_json_file: frs_testing/package.json
29+
version: ${{ steps.pnpm_version.outputs.version }}
2330
- uses: actions/setup-node@v3
2431
with:
2532
cache: 'pnpm'

0 commit comments

Comments
 (0)