-
Notifications
You must be signed in to change notification settings - Fork 1.3k
44 lines (39 loc) · 1.35 KB
/
devcontainer.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: Devcontainer
# When a pull request is opened that changes the Devcontainer configuration,
# ensure that the container continues to build properly.
on:
pull_request:
paths:
- .devcontainer/devcontainer.json
- .github/workflows/devcontainer.yml
- rust-toolchain
permissions:
contents: read
jobs:
rust-version:
runs-on: ubuntu-22.04
container: ghcr.io/linkerd/dev:v43-rust
steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29
- shell: bash
run: |
# Extract current Rust version from the toolchain file.
version_regex='channel = "([0-9]+\.[0-9]+\.[0-9]+)"'
toolchain=$(cat rust-toolchain.toml)
if [[ $toolchain =~ $version_regex ]]; then
tc=${BASH_REMATCH[1]}
else
echo "::error file=rust-toolchain.toml::failed to parse rust-toolchain.toml"
exit 1
fi
dev=$(cargo version | cut -d' ' -f2)
if [ "$dev" != "$tc" ]; then
echo "::error file=rust-toolchain.toml,line=2::rust-toolchain ($tc) does not match devcontainer ($dev)"
exit 1
fi
devcontainer-image:
runs-on: ubuntu-22.04
steps:
- uses: linkerd/dev/actions/setup-tools@v43
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29
- run: just-dev pull-dev-image