update rust toolchain #564
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: update rust toolchain | |
on: | |
push: | |
branches: | |
- main | |
schedule: | |
- cron: "0 0 * * *" | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
update-rust-toolchain: | |
runs-on: ubuntu-latest | |
if: ${{ github.repository_owner == 'VOICEVOX' }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: set up stable rust | |
uses: dtolnay/rust-toolchain@stable | |
- name: update rust toolchain | |
run: | | |
rust_version=$(rustup run stable rustc --version | sed -r "s/.*([0-9]+\.[0-9]+\.[0-9]+[^ ]*).*/\1/") | |
echo "$rust_version" > ./rust-toolchain | |
echo "RUST_VERSION=$rust_version" >> "$GITHUB_ENV" | |
- name: create_pr | |
id: update-rust-toolchain | |
uses: peter-evans/create-pull-request@v4 | |
with: | |
commit-message: Update rust toolchain ${{ env.RUST_VERSION }} | |
branch: update_rust_toolchain_${{ env.RUST_VERSION }} | |
delete-branch: true | |
title: Update rust toolchain ${{ env.RUST_VERSION }} | |
body: | | |
Update rust toolchain ${{ env.RUST_VERSION }} | |
(1度プルリクエストを閉じて再度開くことでテストが実行できます。) |