Nightly Rust release checks #456
This file contains 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: Nightly Rust release checks | |
on: | |
schedule: | |
- cron: '09 1 * * *' | |
workflow_dispatch: | |
jobs: | |
check-for-updated-rust: | |
runs-on: ubuntu-latest | |
environment: expressvpn_iat_automation_githubiatuser_gpg_key | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Import GPG Key | |
uses: crazy-max/ghaction-import-gpg@v6 | |
with: | |
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} | |
passphrase: ${{ secrets.GPG_PASSPHRASE }} | |
git_user_signingkey: true | |
git_commit_gpgsign: true | |
- name: Check for Rust update | |
id: check-version | |
run: | | |
rustup install stable | |
stable=$(rustup run stable rustc -V | sed -E -e 's/^rustc ([0-9\.]+) \(.*\)$/\1/g') | |
echo "Latest stable rust is ${stable}" | |
echo rust="$stable" >> "$GITHUB_OUTPUT" | |
- name: Update Rust version in Earthfile | |
run: sed -i -E 's/^(\s*FROM rust):(:?[0-9\.]+)$/\1:${{ steps.check-version.outputs.rust }}/g' Earthfile | |
- uses: peter-evans/create-pull-request@v6 | |
with: | |
token: ${{ secrets.SERVICE_ACCOUNT_PAT }} | |
delete-branch: true | |
committer: ExpressVPN Automation Bot <[email protected]> | |
author: ExpressVPN Automation Bot <[email protected]> | |
commit-message: "[auto] Update Rust toolchain to ${{ steps.check-version.outputs.rust }}" | |
branch: gha/rust-toolchain-update | |
title: "[auto] Update Rust toolchain to ${{ steps.check-version.outputs.rust }}" | |
body: "Changelog: https://releases.rs/docs/${{ steps.check-version.outputs.rust }}/" |