Rust Version Check #12
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
# Opens a PR to update the nightly Rust version every two weeks | |
name: Rust Version Check | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 0 1,15 * *' | |
jobs: | |
rust-version-check: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
package: [ "aptos", "ethereum", "kadena", "fixture-generator" ] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@nightly | |
- uses: actions/checkout@v4 | |
with: | |
repository: argumentcomputer/ci-workflows | |
path: ci-workflows | |
- uses: ./ci-workflows/.github/actions/rust-version | |
id: rust-version | |
with: | |
toolchain: nightly | |
path: ${{ matrix.package }} | |
- uses: tibdex/github-app-token@v2 | |
if: steps.rust-version.outputs.outdated == 'true' | |
id: generate-token | |
with: | |
app_id: ${{ secrets.TOKEN_APP_ID }} | |
private_key: ${{ secrets.TOKEN_APP_PRIVATE_KEY }} | |
# Open PR if Rust version is out of date with latest nightly | |
- name: Create Pull Request | |
if: steps.compare-versions.outputs.outdated == 'true' | |
uses: peter-evans/create-pull-request@v6 | |
with: | |
token: ${{ steps.generate-token.outputs.token }} | |
branch: "ci-update-rust-version-${{ matrix.package }}" | |
title: "chore: Update `${{ matrix.package }}` Rust version to `nightly-${{ steps.rust-version.outputs.new-version }}`" | |
commit-message: "chore: Update `${{ matrix.package }}` Rust version to `nightly-${{ steps.rust-version.outputs.new-version }}`" | |
labels: "automated-issue" | |
reviewers: "tchataigner, wwared, storojs72, huitseeker, samuelburnham" | |
body: | | |
This is an automated PR updating the `${{ matrix.package }}` Rust version from `nightly-${{ steps.rust-version.outputs.old-version }}` to `nightly-${{ steps.rust-version.outputs.new-version }}` | |
Workflow run: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} |