mirror of
https://github.com/systemd/systemd.git
synced 2024-10-27 18:55:40 +03:00
ci: limit which env variables we pass through sudo
to work around #23987.
This commit is contained in:
parent
f54dce2d4f
commit
d46e7c7cfd
10
.github/workflows/unit_tests.yml
vendored
10
.github/workflows/unit_tests.yml
vendored
@ -32,8 +32,14 @@ jobs:
|
||||
- name: Repository checkout
|
||||
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
|
||||
- name: Install build dependencies
|
||||
run: sudo -E .github/workflows/unit_tests.sh SETUP
|
||||
run: |
|
||||
# Drop XDG_* stuff from /etc/environment, so we don't get the user
|
||||
# XDG_* variables when running under sudo
|
||||
sudo sed -i '/^XDG_/d' /etc/environment
|
||||
# Pass only specific env variables through sudo, to avoid having
|
||||
# the already existing XDG_* stuff on the "other side"
|
||||
sudo --preserve-env=CRYPTOLIB,GITHUB_ACTIONS,CI .github/workflows/unit_tests.sh SETUP
|
||||
- name: Build & test (${{ matrix.run_phase }}-${{ matrix.cryptolib }})
|
||||
run: sudo -E .github/workflows/unit_tests.sh RUN_${{ matrix.run_phase }}
|
||||
run: sudo --preserve-env=CRYPTOLIB,GITHUB_ACTIONS,CI .github/workflows/unit_tests.sh RUN_${{ matrix.run_phase }}
|
||||
env:
|
||||
CRYPTOLIB: ${{ matrix.cryptolib }}
|
||||
|
Loading…
Reference in New Issue
Block a user