Skip to content

Commit abd57fb

Browse files
authored
Merge pull request #2299 from lzutao/pwd
ci: $PWD is equivalent to $(pwd)
2 parents 705b8cb + 974dc15 commit abd57fb

File tree

6 files changed

+18
-24
lines changed

6 files changed

+18
-24
lines changed

.github/workflows/centos-fmt-clippy-on-all.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,8 @@ jobs:
6969
rustup component add clippy
7070
- name: Run the centos check within the docker image
7171
run: |
72-
HERE=$(pwd)
7372
docker run \
74-
--volume "$HERE":/checkout:ro \
73+
--volume "$PWD":/checkout:ro \
7574
--workdir /checkout \
7675
--tty \
7776
--init \

.github/workflows/linux-builds-on-master.yaml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -93,15 +93,14 @@ jobs:
9393
fi
9494
- name: Run the build within the docker image
9595
run: |
96-
HERE=$(pwd)
97-
mkdir -p "${HERE}/target"
98-
chown -R "$(id -u)":"$(id -g)" "${HERE}/target"
96+
mkdir -p "${PWD}/target"
97+
chown -R "$(id -u)":"$(id -g)" "${PWD}/target"
9998
docker run \
10099
--entrypoint sh \
101100
--user "$(id -u)":"$(id -g)" \
102101
--volume "$(rustc --print sysroot)":/rustc-sysroot:ro \
103-
--volume "${HERE}":/checkout:ro \
104-
--volume "${HERE}"/target:/checkout/target \
102+
--volume "${PWD}":/checkout:ro \
103+
--volume "${PWD}"/target:/checkout/target \
105104
--workdir /checkout \
106105
--env TARGET="${TARGET}" \
107106
--env SKIP_TESTS="${SKIP_TESTS}" \

.github/workflows/linux-builds-on-pr.yaml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -88,15 +88,14 @@ jobs:
8888
fi
8989
- name: Run the build within the docker image
9090
run: |
91-
HERE=$(pwd)
92-
mkdir -p "${HERE}/target"
93-
chown -R "$(id -u)":"$(id -g)" "${HERE}/target"
91+
mkdir -p "${PWD}/target"
92+
chown -R "$(id -u)":"$(id -g)" "${PWD}/target"
9493
docker run \
9594
--entrypoint sh \
9695
--user "$(id -u)":"$(id -g)" \
9796
--volume "$(rustc --print sysroot)":/rustc-sysroot:ro \
98-
--volume "${HERE}":/checkout:ro \
99-
--volume "${HERE}"/target:/checkout/target \
97+
--volume "${PWD}":/checkout:ro \
98+
--volume "${PWD}"/target:/checkout/target \
10099
--workdir /checkout \
101100
--env TARGET="${TARGET}" \
102101
--env SKIP_TESTS="${SKIP_TESTS}" \

.github/workflows/linux-builds-on-stable.yaml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -107,15 +107,14 @@ jobs:
107107
fi
108108
- name: Run the build within the docker image
109109
run: |
110-
HERE=$(pwd)
111-
mkdir -p "${HERE}/target"
112-
chown -R "$(id -u)":"$(id -g)" "${HERE}/target"
110+
mkdir -p "${PWD}/target"
111+
chown -R "$(id -u)":"$(id -g)" "${PWD}/target"
113112
docker run \
114113
--entrypoint sh \
115114
--user "$(id -u)":"$(id -g)" \
116115
--volume "$(rustc --print sysroot)":/rustc-sysroot:ro \
117-
--volume "${HERE}":/checkout:ro \
118-
--volume "${HERE}"/target:/checkout/target \
116+
--volume "${PWD}":/checkout:ro \
117+
--volume "${PWD}"/target:/checkout/target \
119118
--workdir /checkout \
120119
--env TARGET="${TARGET}" \
121120
--env SKIP_TESTS="${SKIP_TESTS}" \

ci/actions-templates/centos-fmt-clippy-template.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,8 @@ jobs:
6969
rustup component add clippy
7070
- name: Run the centos check within the docker image
7171
run: |
72-
HERE=$(pwd)
7372
docker run \
74-
--volume "$HERE":/checkout:ro \
73+
--volume "$PWD":/checkout:ro \
7574
--workdir /checkout \
7675
--tty \
7776
--init \

ci/actions-templates/linux-builds-template.yaml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -115,15 +115,14 @@ jobs:
115115
fi
116116
- name: Run the build within the docker image
117117
run: |
118-
HERE=$(pwd)
119-
mkdir -p "${HERE}/target"
120-
chown -R "$(id -u)":"$(id -g)" "${HERE}/target"
118+
mkdir -p "${PWD}/target"
119+
chown -R "$(id -u)":"$(id -g)" "${PWD}/target"
121120
docker run \
122121
--entrypoint sh \
123122
--user "$(id -u)":"$(id -g)" \
124123
--volume "$(rustc --print sysroot)":/rustc-sysroot:ro \
125-
--volume "${HERE}":/checkout:ro \
126-
--volume "${HERE}"/target:/checkout/target \
124+
--volume "${PWD}":/checkout:ro \
125+
--volume "${PWD}"/target:/checkout/target \
127126
--workdir /checkout \
128127
--env TARGET="${TARGET}" \
129128
--env SKIP_TESTS="${SKIP_TESTS}" \

0 commit comments

Comments
 (0)