dtolnay / dtolnay/rust-toolchain

Add dependabot-compatible tag for each release

Open
#160 1 comment 19 reactions 0 assignees View on GitHub
Dominant language
Shell
Stars
1.6k
Forks
95
Avg merge
2h 39m
Merged PRs (30d)
1

Description

Currently, there's a branch per release to make it easy to select the Rust version you want. However, to [improve the security posture](https://docs.github.com/en/actions/how-tos/security-for-github-actions/security-guides/security-hardening-for-github-actions#using-third-party-actions) of some projects (and reproducability of CI), I'd like to instead pin them to a specific commit, and then have dependabot automatically bump that commit ([and the tag comment](https://github.blog/changelog/2022-10-31-dependabot-now-updates-comments-in-github-actions-workflows-referencing-action-versions/)) when a new version is available. Dependabot understands tags like `v1.2.3`, but does _not_ know what to do when there are no tags and just branches.

In other words, I want to write

```yaml
uses: dtolnay/rust-toolchain@223bb27ae52e8d884432aaedb658fa4d9fc173b1 # tag=v1.72.1
with:
toolchain: stable
```

This works today, it just doesn't get auto-updated by dependabot since there are no tags.

The sad part is that this loses out on is the ability to make changes to 1.72.1 after the fact, such as if the _means_ of installation change (i.e., the action changes), since there would be no way to indicate that such a change had been made through the tags alone. I don't have a great answer to that. One way to go about it is to have the tag instead be the version of the _action_ (as just a simple sequence number), bump that on every new Rust release (or action change), and then have the version of Rust be chosen with `toolchain:`, but I don't know if that's compatible with the action's current implementation?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.