Skip to content

Commit 9629794

Browse files
committed
Use GITHUB_PATH instead of GITHUB_ENV to set PATH var on workflows
1 parent 1db6532 commit 9629794

File tree

2 files changed

+45
-47
lines changed

2 files changed

+45
-47
lines changed

.github/workflows/package.yml

Lines changed: 30 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,9 @@ jobs:
3838
- name: Activate python3 venv
3939
run: |
4040
bin/activate_python3_venv.sh
41-
export PATH="/tmp/hurl-python3-venv/bin:$PATH"
42-
echo "PATH=$PATH" >> $GITHUB_ENV
41+
echo "/tmp/hurl-python3-venv/bin" >> $GITHUB_PATH
42+
- name: Python infos
43+
run: |
4344
which python3
4445
python3 --version
4546
pip --version
@@ -50,7 +51,7 @@ jobs:
5051
- name: Build
5152
run: |
5253
bin/release/release.sh
53-
echo "PATH=:${PWD}/target/release:$PATH" >> "${GITHUB_ENV}"
54+
echo "${PWD}/target/release" >> "${GITHUB_PATH}"
5455
- name: Get version
5556
run: |
5657
VERSION=$(bin/release/get_version.sh)
@@ -378,8 +379,9 @@ jobs:
378379
- name: Activate python3 venv
379380
run: |
380381
bin/activate_python3_venv.sh
381-
export PATH="/tmp/hurl-python3-venv/bin:$PATH"
382-
echo "PATH=$PATH" >> $GITHUB_ENV
382+
echo "/tmp/hurl-python3-venv/bin" >> $GITHUB_PATH
383+
- name: Python infos
384+
run: |
383385
which python3
384386
python3 --version
385387
pip --version
@@ -390,7 +392,7 @@ jobs:
390392
- name: Build
391393
run: |
392394
bin/release/release.sh
393-
echo "PATH=:${PWD}/target/release:$PATH" >> "${GITHUB_ENV}"
395+
echo "${PWD}/target/release" >> "${GITHUB_PATH}"
394396
- name: Get version
395397
run: |
396398
VERSION=$(bin/release/get_version.sh)
@@ -430,8 +432,9 @@ jobs:
430432
- name: Activate python3 venv
431433
run: |
432434
bin/activate_python3_venv.sh
433-
export PATH="/tmp/hurl-python3-venv/bin:$PATH"
434-
echo "PATH=$PATH" >> $GITHUB_ENV
435+
echo "/tmp/hurl-python3-venv/bin" >> $GITHUB_PATH
436+
- name: Python infos
437+
run: |
435438
which python3
436439
python3 --version
437440
pip --version
@@ -442,7 +445,7 @@ jobs:
442445
- name: Build
443446
run: |
444447
bin/release/release.sh
445-
echo "PATH=:${PWD}/target/release:$PATH" >> "${GITHUB_ENV}"
448+
echo "${PWD}/target/release" >> "${GITHUB_PATH}"
446449
- name: Get version
447450
run: |
448451
VERSION=$(bin/release/get_version.sh)
@@ -454,7 +457,7 @@ jobs:
454457
- name: Install package
455458
run: |
456459
bin/release/install_deb_package.sh
457-
echo "PATH=/tmp/hurl-deb-package/usr/bin:$PATH" >> "${GITHUB_ENV}"
460+
echo "/tmp/hurl-deb-package/usr/bin" >> "${GITHUB_PATH}"
458461
- name: Test integ
459462
run: |
460463
bin/test/test_prerequisites.sh
@@ -482,8 +485,9 @@ jobs:
482485
- name: Activate python3 venv
483486
run: |
484487
bin/activate_python3_venv.sh
485-
export PATH="/tmp/hurl-python3-venv/bin:$PATH"
486-
echo "PATH=$PATH" >> $GITHUB_ENV
488+
echo "/tmp/hurl-python3-venv/bin" >> $GITHUB_PATH
489+
- name: Python infos
490+
run: |
487491
which python3
488492
python3 --version
489493
pip --version
@@ -494,7 +498,7 @@ jobs:
494498
- name: Build
495499
run: |
496500
bin/release/release.sh
497-
echo "PATH=:${PWD}/target/release:$PATH" >> "${GITHUB_ENV}"
501+
echo "${PWD}/target/release" >> "${GITHUB_PATH}"
498502
- name: Get version
499503
run: |
500504
VERSION=$(bin/release/get_version.sh)
@@ -506,7 +510,7 @@ jobs:
506510
- name: Install package
507511
run: |
508512
bin/release/install_deb_package.sh
509-
echo "PATH=/tmp/hurl-deb-package/usr/bin:$PATH" >> "${GITHUB_ENV}"
513+
echo "/tmp/hurl-deb-package/usr/bin" >> "${GITHUB_PATH}"
510514
- name: Test integ
511515
run: |
512516
bin/test/test_prerequisites.sh
@@ -527,14 +531,13 @@ jobs:
527531
persist-credentials: false
528532
ref: ${{ inputs.branch }}
529533
- name: Install Prerequisites
530-
run: |
531-
bin/install_prerequisites_macos.sh
532-
echo "PATH=$PATH" >> $GITHUB_ENV
534+
run: bin/install_prerequisites_macos.sh
533535
- name: Activate python3 venv
534536
run: |
535537
bin/activate_python3_venv.sh
536-
export PATH="/tmp/hurl-python3-venv/bin:$PATH"
537-
echo "PATH=$PATH" >> $GITHUB_ENV
538+
echo "/tmp/hurl-python3-venv/bin" >> $GITHUB_PATH
539+
- name: Python infos
540+
run: |
538541
which python3
539542
python3 --version
540543
pip --version
@@ -545,7 +548,7 @@ jobs:
545548
- name: Build
546549
run: |
547550
bin/release/release.sh
548-
echo "PATH=${PWD}/target/release:$PATH" >> "${GITHUB_ENV}"
551+
echo "${PWD}/target/release" >> "${GITHUB_PATH}"
549552
- name: Get version
550553
run: |
551554
VERSION=$(bin/release/get_version.sh)
@@ -557,7 +560,7 @@ jobs:
557560
- name: Install package
558561
run: |
559562
bin/release/install_generic_macos_package.sh
560-
echo "PATH=/tmp/hurl-generic-macos/bin:$PATH" >> "${GITHUB_ENV}"
563+
echo "/tmp/hurl-generic-macos/bin" >> "${GITHUB_PATH}"
561564
- name: Test integ
562565
run: |
563566
bin/test/test_prerequisites.sh
@@ -578,14 +581,13 @@ jobs:
578581
persist-credentials: false
579582
ref: ${{ inputs.branch }}
580583
- name: Install Prerequisites
581-
run: |
582-
bin/install_prerequisites_macos.sh
583-
echo "PATH=$PATH" >> $GITHUB_ENV
584+
run: bin/install_prerequisites_macos.sh
584585
- name: Activate python3 venv
585586
run: |
586587
bin/activate_python3_venv.sh
587-
export PATH="/tmp/hurl-python3-venv/bin:$PATH"
588-
echo "PATH=$PATH" >> $GITHUB_ENV
588+
echo "/tmp/hurl-python3-venv/bin" >> $GITHUB_PATH
589+
- name: Python infos
590+
run: |
589591
which python3
590592
python3 --version
591593
pip --version
@@ -596,7 +598,7 @@ jobs:
596598
- name: Build
597599
run: |
598600
bin/release/release.sh
599-
echo "PATH=${PWD}/target/release:$PATH" >> "${GITHUB_ENV}"
601+
echo "${PWD}/target/release" >> "${GITHUB_PATH}"
600602
- name: Get version
601603
run: |
602604
VERSION=$(bin/release/get_version.sh)
@@ -608,7 +610,7 @@ jobs:
608610
- name: Install package
609611
run: |
610612
bin/release/install_generic_macos_package.sh
611-
echo "PATH=/tmp/hurl-generic-macos/bin:$PATH" >> "${GITHUB_ENV}"
613+
echo "/tmp/hurl-generic-macos/bin" >> "${GITHUB_PATH}"
612614
- name: Test integ
613615
run: |
614616
bin/test/test_prerequisites.sh

.github/workflows/test.yml

Lines changed: 15 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646
- name: Build
4747
run: |
4848
bin/release/release.sh
49-
echo "PATH=${PWD}/target/release:$PATH" >> "${GITHUB_ENV}"
49+
echo "${PWD}/target/release" >> "${GITHUB_PATH}"
5050
- name: Archive artifacts
5151
uses: actions/upload-artifact@v6.0.0
5252
if: ${{ always() }}
@@ -94,8 +94,7 @@ jobs:
9494
- name: Activate python3 venv
9595
run: |
9696
bin/activate_python3_venv.sh
97-
export PATH="/tmp/hurl-python3-venv/bin:$PATH"
98-
echo "PATH=$PATH" >> $GITHUB_ENV
97+
echo "/tmp/hurl-python3-venv/bin" >> $GITHUB_PATH
9998
- name: Install Rust
10099
run: bin/install_rust.sh
101100
- name: Environment
@@ -106,7 +105,7 @@ jobs:
106105
run: |
107106
bin/test/test_unit.sh
108107
bin/release/release.sh
109-
echo "PATH=${PWD}/target/release:$PATH" >> "${GITHUB_ENV}"
108+
echo "${PWD}/target/release" >> "${GITHUB_PATH}"
110109
- name: Integration Tests
111110
run: bin/test/test_integ.sh
112111
- name: Integration Tests (Hurl files using CRLF)
@@ -149,8 +148,7 @@ jobs:
149148
- name: Activate python3 venv
150149
run: |
151150
bin/activate_python3_venv.sh
152-
export PATH="/tmp/hurl-python3-venv/bin:$PATH"
153-
echo "PATH=$PATH" >> $GITHUB_ENV
151+
echo "/tmp/hurl-python3-venv/bin" >> $GITHUB_PATH
154152
- name: Install Rust
155153
run: bin/install_rust.sh
156154
- name: Environment
@@ -161,7 +159,7 @@ jobs:
161159
run: |
162160
bin/test/test_unit.sh
163161
bin/release/release.sh
164-
echo "PATH=${PWD}/target/release:$PATH" >> "${GITHUB_ENV}"
162+
echo "${PWD}/target/release" >> "${GITHUB_PATH}"
165163
- name: Integration Tests
166164
run: bin/test/test_integ.sh
167165
- name: Archive production artifacts
@@ -326,14 +324,13 @@ jobs:
326324
persist-credentials: false
327325
ref: ${{ inputs.branch }}
328326
- name: Install Prerequisites
329-
run: |
330-
bin/install_prerequisites_macos.sh
331-
echo "PATH=$PATH" >> $GITHUB_ENV
327+
run: bin/install_prerequisites_macos.sh
332328
- name: Activate python3 venv
333329
run: |
334330
bin/activate_python3_venv.sh
335-
export PATH="/tmp/hurl-python3-venv/bin:$PATH"
336-
echo "PATH=$PATH" >> $GITHUB_ENV
331+
echo "/tmp/hurl-python3-venv/bin" >> $GITHUB_PATH
332+
- name: Python infos
333+
run: |
337334
which python3
338335
python3 --version
339336
pip --version
@@ -348,7 +345,7 @@ jobs:
348345
run: |
349346
bin/test/test_unit.sh
350347
bin/release/release.sh
351-
echo "PATH=${PWD}/target/release:$PATH" >> "${GITHUB_ENV}"
348+
echo "${PWD}/target/release" >> "${GITHUB_PATH}"
352349
- name: Find artifacts
353350
run: |
354351
pwd
@@ -374,14 +371,13 @@ jobs:
374371
persist-credentials: false
375372
ref: ${{ inputs.branch }}
376373
- name: Install Prerequisites
377-
run: |
378-
bin/install_prerequisites_macos.sh
379-
echo "PATH=$PATH" >> $GITHUB_ENV
374+
run: bin/install_prerequisites_macos.sh
380375
- name: Activate python3 venv
381376
run: |
382377
bin/activate_python3_venv.sh
383-
export PATH="/tmp/hurl-python3-venv/bin:$PATH"
384-
echo "PATH=$PATH" >> $GITHUB_ENV
378+
echo "/tmp/hurl-python3-venv/bin" >> $GITHUB_PATH
379+
- name: Python infos
380+
run: |
385381
which python3
386382
python3 --version
387383
pip --version
@@ -396,7 +392,7 @@ jobs:
396392
run: |
397393
bin/test/test_unit.sh
398394
bin/release/release.sh
399-
echo "PATH=${PWD}/target/release:$PATH" >> "${GITHUB_ENV}"
395+
echo "${PWD}/target/release" >> "${GITHUB_PATH}"
400396
- name: Find artifacts
401397
run: |
402398
pwd

0 commit comments

Comments
 (0)