rust-serverless / lambda-rust

🐳 🦀 a dockerized lambda build env for rust applications
MIT License
34 stars 8 forks source link

GitHub action to check Rust stable version against Rust installed in latest docker container #8

Closed jerusdp closed 3 years ago

jerusdp commented 3 years ago

Objective

Periodically check the version of Rust in the latest docker container against the current Rust Stable channel version and create an issue if they do not match.

Components

The following components are added/changed:

* adds check.yml GitHub action

* amends Makefile

* adds latest.sh

* amends Dockerfile

check.yml

The GitHub Action action runs two jobs: check and create_issue. The action is scheduled to trigger each Tuesday morning at 0400Z. The action can also be triggered using a workflow_dispatch event.

check

Runs make check run the latest.sh script installed in the latest docker container.

create_issue

Runs if the check job fails to create an issue in the issue log.

Makefile

Adds a new task to run the latest docker container using the latest.sh as the entrypoint (instead of the default build.sh entrypoint).

latest.sh

Installs the Rust stable channel on the container. Uses rustup check to extract the version number of the stable container. Uses rustup show to extract the version number of the default toolchain (initially installed in the container). Compares and exits with an error if they do not match.

Dockerfile

Adds latest.sh to the build