-
Notifications
You must be signed in to change notification settings - Fork 4
45 lines (39 loc) · 1.63 KB
/
nightly-rust-update-check.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
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 }}/"