ci: restore dependency-storing dockerfile
This commit is contained in:
parent
9052dd556a
commit
fe1796cfa7
4 changed files with 95 additions and 29 deletions
23
.github/workflows/set-vars.sh
vendored
Executable file
23
.github/workflows/set-vars.sh
vendored
Executable file
|
|
@ -0,0 +1,23 @@
|
|||
#!/bin/sh
|
||||
|
||||
msrv=$(
|
||||
awk '/^rust-version = "[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+"$/ {
|
||||
print substr($NF, 2, length($NF) - 2)
|
||||
}' Cargo.toml
|
||||
)
|
||||
if [ -z $msrv ]; then
|
||||
printf "Could not determine Rust toolchain version\n"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
git fetch --depth=1 origin +refs/tags/*:refs/tags/*
|
||||
if ! git diff HEAD~1 --quiet -- "$UBUNTU_DOCKERFILE" ||
|
||||
git describe --candidates=0; then
|
||||
should_build=true
|
||||
else
|
||||
should_build=false
|
||||
fi
|
||||
|
||||
echo "msrv=$msrv" >> "$GITHUB_OUTPUT"
|
||||
echo "should_build=$should_build" >> "$GITHUB_OUTPUT"
|
||||
echo "container_path=$REGISTRY/$1" >> "$GITHUB_OUTPUT"
|
||||
Loading…
Add table
Add a link
Reference in a new issue