{"id":16345687,"url":"https://github.com/a-kenji/update-rust-toolchain","last_synced_at":"2025-03-20T23:32:40.557Z","repository":{"id":38360157,"uuid":"471497965","full_name":"a-kenji/update-rust-toolchain","owner":"a-kenji","description":"Automatically update your rust toolchain.","archived":false,"fork":false,"pushed_at":"2024-10-19T03:13:40.000Z","size":574,"stargazers_count":4,"open_issues_count":2,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-10-19T05:29:54.733Z","etag":null,"topics":["action","rust","rust-toolchain","rustup","toolchain"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/a-kenji.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-03-18T19:50:24.000Z","updated_at":"2024-10-09T10:35:44.000Z","dependencies_parsed_at":"2024-01-28T03:24:47.690Z","dependency_job_id":"bca26fe0-4fca-48cd-9356-dc756a50fd4d","html_url":"https://github.com/a-kenji/update-rust-toolchain","commit_stats":{"total_commits":97,"total_committers":2,"mean_commits":48.5,"dds":"0.20618556701030932","last_synced_commit":"c2bdc5bfabe817ea785c1c5d80540046e725908f"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a-kenji%2Fupdate-rust-toolchain","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a-kenji%2Fupdate-rust-toolchain/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a-kenji%2Fupdate-rust-toolchain/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a-kenji%2Fupdate-rust-toolchain/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/a-kenji","download_url":"https://codeload.github.com/a-kenji/update-rust-toolchain/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221810219,"owners_count":16884069,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["action","rust","rust-toolchain","rustup","toolchain"],"created_at":"2024-10-11T00:32:54.968Z","updated_at":"2024-10-28T08:53:44.287Z","avatar_url":"https://github.com/a-kenji.png","language":"Shell","readme":"# update-rust-toolchain\n[![Matrix Chat Room](https://img.shields.io/badge/chat-on%20matrix-1d7e64?logo=matrix\u0026style=flat-square)](https://matrix.to/#/#update-rust-toolchain:matrix.org)\n\n\nThis is a GitHub Action that will update your `rust-toolchain` / `rust-toolchain.toml` file, when it is run.\n\nKeep a shared rust version for your project,\nwhile also keeping it up to date.\n\nUpdate patch versions as soon as they release,\nor even update your minor versions.\n\nWill usually take between 3-6 seconds to execute.\n\n# Usage:\n\nCreates a pr with an update to the latest rust-version.\n```\njobs:\n  rust-toolchain:\n    runs-on: ubuntu-latest\n    steps:\n      - name: Checkout repository\n        uses: actions/checkout@v3\n      - name: Update rust-toolchain\n        uses: a-kenji/update-rust-toolchain\n```\nCreates a pr with an update to the latest patch of your selected rust-version.\n```\njobs:\n  rust-toolchain:\n    runs-on: ubuntu-latest\n    steps:\n      - name: Checkout repository\n        uses: actions/checkout@v3\n      - name: Update rust-toolchain\n        uses: a-kenji/update-rust-toolchain\n        with:\n          update-minor: false\n```\n\n# Running GitHub Actions on the Action\nGitHub Actions will not trigger workflows by a PR that is itself opened by a GitHub Action: [Triggering a workflow from a workflow](https://docs.github.com/en/actions/using-workflows/triggering-a-workflow#triggering-a-workflow-from-a-workflow). There are three ways to have GitHub Actions CI run on a PR submitted by this action.\n\n## Manually\nYou can manually run the following commands, in order to force a CI run of the PR.\n```\ngit branch -D update_rust_toolchain_action\ngit fetch origin\ngit checkout update_rust_toolchain_action\ngit commit --amend --no-edit\ngit push origin update_rust_toolchain_action --force\n```\n\n## With a Personal Authentication Token\n\nBy providing a Personal Authentication Token([Using the `GITHUB_TOKEN` in a Workflow](https://docs.github.com/en/actions/security-guides/automatic-token-authentication#using-the-github_token-in-a-workflow)), the PR will be submitted in a way that bypasses this limitation (GitHub will essentially think it is the owner of the PAT submitting the PR, and not an Action).\nYou can create a token by visiting https://github.com/settings/tokens and select at least the `repo` scope. Then, store this token in your repository secrets (i.e. `https://github.com/\u003cUSER\u003e/\u003cREPO\u003e/settings/secrets/actions`) as `GH_TOKEN_FOR_UPDATES` and set up your workflow file like the following:\n\n```\nname: update-rust-toolchain\non:\n  workflow_dispatch: # allows manual triggering\n  schedule:\n    - cron: '0 9 * * sun' # runs at 9 am on every sunday\n\njobs:\n  update-rust-toolchain:\n    name: \"Update rust-toolchain\"\n    runs-on: ubuntu-latest\n    steps:\n      - name: Checkout repository\n        uses: actions/checkout@v3\n      - name: update rust toolchain\n        uses: a-kenji/update-rust-toolchain@v1\n        with:\n          token: ${{ secrets.GH_TOKEN_FOR_UPDATES }}\n```\nIt is additionally recommended to scope the environment variable in an environment, if possible.\n\n## With a label trigger\nAn action can be set up to be triggered on adding a label, such as `pr-run-tests`.\nPlease note that this follows the same rules as a pr itself, so if an action sets \nthe label, the workflow will not be run.\n\n\n# Currently supports:\n\n* Toolchain files in the following format:\n\n`rust-toolchain`\n```\n1.45.0\n```\n\n`rust-toolchain.toml`\n```\n[toolchain]\nchannel = \"1.45.0\"\ncomponents = [\"rustfmt\", \"clippy\", \"rust-analysis\"]\ntargets = [\"wasm32-wasi\"]\n```\n\nChannels with the `Beta`, or `Nightly` prefix are not yet supported.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fa-kenji%2Fupdate-rust-toolchain","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fa-kenji%2Fupdate-rust-toolchain","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fa-kenji%2Fupdate-rust-toolchain/lists"}