build(deps): bump tj-actions/changed-files from 9200e69727eb73eb060652b19946b8a2fdfb654b to 0b975f61488402a699abcebd6a1e25924cf85218 #879
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: rust-toolchain | |
| on: | |
| pull_request: | |
| paths: | |
| - rust-toolchain | |
| - "**Dockerfile" | |
| - ".github/workflows/*" | |
| - ".github/**/Dockerfile" | |
| permissions: | |
| contents: read | |
| jobs: | |
| devcontainer: | |
| runs-on: ubuntu-24.04 | |
| container: ghcr.io/linkerd/dev:v45-rust | |
| steps: | |
| - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 | |
| - run: git config --global --add safe.directory "$PWD" # actions/runner#2033 | |
| - run: | | |
| VERSION_REGEX='channel = "([0-9]+\.[0-9]+\.[0-9]+)"' | |
| TOOLCHAIN=$(cat rust-toolchain.toml) | |
| if [[ $TOOLCHAIN =~ $VERSION_REGEX ]]; then | |
| VERSION=${BASH_REMATCH[1]} | |
| if [ "$(cargo --version | cut -d' ' -f2)" != "$VERSION" ]; then | |
| echo "::error file=rust-toolchain.toml::rust-toolchain channel '$VERSION' does not match devcontainer '$(cargo --version)'" | |
| exit 1 | |
| fi | |
| else | |
| echo "::error file=rust-toolchain.toml::failed to parse rust-toolchain.toml" | |
| exit 1 | |
| fi | |
| shell: bash | |
| workflows: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: linkerd/dev/actions/setup-tools@v45 | |
| - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 | |
| - shell: bash | |
| run: | | |
| VERSION_REGEX='channel = "([0-9]+\.[0-9]+\.[0-9]+)"' | |
| TOOLCHAIN=$(cat rust-toolchain.toml) | |
| if [[ $TOOLCHAIN =~ $VERSION_REGEX ]]; then | |
| VERSION=${BASH_REMATCH[1]} | |
| else | |
| echo "::error file=rust-toolchain.toml::failed to parse rust-toolchain.toml" | |
| exit 1 | |
| fi | |
| ex=0 | |
| while IFS= read -r file ; do | |
| while IFS= read -r image ; do | |
| if [[ "$image" =~ ^docker://(docker.io/library/)?rust: ]]; then | |
| tag="${image##*rust:}" | |
| v="${tag%%-*}" | |
| if [[ "$v" != "$VERSION" ]]; then | |
| echo "::warning file=$file::$file uses incorrect rust version: '$v' (rust-toolchain.toml contains '$VERSION')" | |
| ex=$((ex + 1)) | |
| fi | |
| fi | |
| done < <(yq '.jobs[] | select(.container) | .container.image // .container' "$file") | |
| done < <(find .github/workflows -name '*.yml') | |
| exit $ex |