Skip to content

Update rustc

Update rustc #101

Workflow file for this run

name: Update rustc
on:
workflow_dispatch:
schedule:
# At 07:00 UTC on day-of-month 1 and 15. Use https://crontab.guru/ to edit this.
- cron: '0 7 1,15 * *'
jobs:
# Update the version of rustc, open a PR and assign a developer.
update:
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v2
- name: Update rustc version
run: |
NIGHTLY_VERSION="nightly-$(
curl -s https://rust-lang.github.io/rustup-components-history/x86_64-unknown-linux-gnu/rustc-dev
)"
echo "The updated version of rustc is $NIGHTLY_VERSION"
sed -i 's/^channel\s*=.*$/channel = "'"$NIGHTLY_VERSION"'"/' rust-toolchain
DEVELOPER="vakaras"
echo "NIGHTLY_VERSION=$NIGHTLY_VERSION" >> $GITHUB_ENV
echo "DEVELOPER=$DEVELOPER" >> $GITHUB_ENV
- name: Open a pull request
uses: peter-evans/create-pull-request@v3
with:
# Use viper-admin's token to workaround a restriction of GitHub.
# See: https://github.com/peter-evans/create-pull-request/issues/48
token: ${{ secrets.RUSTC_UPDATE_TOKEN }}
commit-message: Update rustc to ${{ env.NIGHTLY_VERSION }}
title: Update rustc to ${{ env.NIGHTLY_VERSION }}
branch: auto-update-rustc
delete-branch: true
assignees: ${{ env.DEVELOPER }}
body: |
* Update rustc to `${{ env.NIGHTLY_VERSION }}`.
@${{ env.DEVELOPER }} could you take care of this?