...

Text file src/github.com/linkerd/linkerd2/.github/workflows/devcontainer.yml

Documentation: github.com/linkerd/linkerd2/.github/workflows

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

View as plain text