Add tooling to bump action version#3022
Conversation
|
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
BenjaminBossan
left a comment
There was a problem hiding this comment.
Very nice work, this could potentially be useful more generally. Besides my comments, let's fix the linting error.
In testing, I noticed that a comment was removed that followed a changed line, can this be prevented? python scripts/bump_action_versions.py ./.github/workflows/tests.yml; git diff -w .github/workflows/tests.yml
[...]
@@ -150,10 +150,7 @@ jobs:
# make sure that cache cleaning doesn't break the pipeline
python scripts/ci_clean_cache.py -d || true
- name: Update model cache
- uses: actions/cache/save@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
- # Only let one runner (preferably the one that covers most tests) update the model cache
- # after *every* run. This way we make sure that our cache is never outdated and we don't
- # have to keep track of hashes.
+ uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
if: always() && matrix.os == 'ubuntu-latest' && matrix.python-version == '3.10'
with:
path: |
| from functools import lru_cache | ||
|
|
||
| import requests | ||
| from ruamel.yaml import YAML |
There was a problem hiding this comment.
Let's add instructions how to install this, as it's not a PEFT dependency.
| Prints a summary of all version changes for review in the end. | ||
| Supports multiple workflows at once. | ||
| Caches queries so updates are fast. | ||
|
|
There was a problem hiding this comment.
Let's add info on creating the bearer token (basically what's in the PR description) here. Let's also link to where to create it: https://github.com/settings/personal-access-tokens.
|
this will also do the same thing but with one workflow file #3040 |
Add a CLI tool for bumping workflow actions to their newest release.
Requirements were:
GitHub limits the number of API calls so for repeated execution it is recommended to create a
.github_bearer_tokenfile containing an API token for the user's account (no permissions are needed) to increase the rate limit significantly (60/h to 1000+/h).Here's an example of a summary at the end of the update run:
Note that there's currently a lot of inconsistent formatting in the workflow files which the YAML formatter will rectify,
git diff -wmakes review rather simple, though.