File tree Expand file tree Collapse file tree 4 files changed +44
-0
lines changed Expand file tree Collapse file tree 4 files changed +44
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Check
2+
3+ on :
4+ workflow_dispatch :
5+ schedule :
6+ - cron : ' 0 4 * * 3'
7+
8+ jobs :
9+ check :
10+ runs-on : ubuntu-latest
11+ steps :
12+ - uses : actions/checkout@v2
13+ name : Check Rust Version
14+ - run : make check
15+ create_issue :
16+ runs-on : ubuntu-latest
17+ needs : check
18+ if : always() && (needs.check.result == 'failure')
19+ steps :
20+ - run : gh issue create --title "Time to update to Rust" --body "Build update for next version of Rust" --label "enhancement" -R $GITHUB_REPOSITORY
21+ env :
22+ GITHUB_TOKEN : ${{secrets.GITHUB_TOKEN}}
23+
Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ RUN yum install -y jq openssl-devel
88RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs \
99 | CARGO_HOME=/cargo RUSTUP_HOME=/rustup sh -s -- -y --profile minimal --default-toolchain $RUST_VERSION
1010ADD build.sh /usr/local/bin/
11+ ADD latest.sh /usr/local/bin/
1112VOLUME ["/code" ]
1213WORKDIR /code
1314ENTRYPOINT ["/usr/local/bin/build.sh" ]
Original file line number Diff line number Diff line change @@ -25,3 +25,8 @@ debug: build
2525 -v ${HOME} /.cargo/git:/cargo/git \
2626 --entrypoint=/bin/bash \
2727 $(REPO ) :$(TAG )
28+
29+ check :
30+ $(DOCKER ) run --rm \
31+ --entrypoint=/usr/local/bin/latest.sh \
32+ $(REPO )
Original file line number Diff line number Diff line change 1+ #! /bin/bash -eux
2+
3+ export CARGO_HOME=" /cargo"
4+ export RUSTUP_HOME=" /rustup"
5+
6+ # shellcheck disable=SC1091
7+ source /cargo/env
8+
9+ rustup toolchain install stable --profile=minimal
10+ STABLE=$( rustup check | grep stable | grep -E " [0-9]+\.[0-9]+\.[0-9]+" -o)
11+ DEFAULT=$( rustup show | grep -m 1 default | grep -E " [0-9]+\.[0-9]+\.[0-9]+" -o)
12+
13+ if [ " ${STABLE} " == " ${DEFAULT} " ]; then exit 0
14+ else exit 1
15+ fi
You can’t perform that action at this time.
0 commit comments